Expand my Community achievements bar.

SOLVED

Issue in mapping Date-Time attribute from a csv file to a DateTime column in an Experience Event dataset

Avatar

Level 3

Hi,

 

I have created a mapping set to map all the attributes coming as part of a csv file. Then using this mapping set in a dataflow to load all the data in a dataset (Experience Event). In my csv file I have couple of date time attributes containing values like "2025-02-16T14:39:13.000", "2025-02-16T07:14:36.000" etc. In my XDM schema corresponding columns/attributes are defined of type "DateTime". When I run my dataflow I do not get any error but these date time columns shows null values in the dataset. All other attributes shows correct values in the dataset. After this behavior I tried to update my mapping set with following date() function but still the values are coming as Null for those date time columns:

 

Data Mapping Test 1:

{
"sourceType": "ATTRIBUTE",
"source": "date(trim(action_ts_utc), 'yyyy-MM-dd HH:mm:ss')",
"destination": "_tenant.actionTimestamp"
}
 
Data Mapping Test 2:
{
"sourceType": "ATTRIBUTE",
"source": "date(trim(action_ts_utc), 'yyyy-MM-dd T HH:mm:ss')",
"destination": "_tenant.actionTimestamp"
}
 
Looking for some help from the community members on this issue.
 
Thanks.
Prateek
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Please ignore. This issue is resolved now. Solution was to change value of "sourceType". I was using "ATTRIBUTE" instead of "EXPRESSION".

 

Data Mapping Test 1:

{
"sourceType": "EXPRESSION",
"source": "date(trim(action_ts_utc), 'yyyy-MM-dd HH:mm:ss')",
"destination": "_tenant.actionTimestamp"
}

 

View solution in original post

4 Replies

Avatar

Level 3

Hi @brekrut  and @DavidRoss91 do you have any point of view on above issue? 

 

Please let me know.

 

Thanks.

Prateek

Avatar

Correct answer by
Level 3

Please ignore. This issue is resolved now. Solution was to change value of "sourceType". I was using "ATTRIBUTE" instead of "EXPRESSION".

 

Data Mapping Test 1:

{
"sourceType": "EXPRESSION",
"source": "date(trim(action_ts_utc), 'yyyy-MM-dd HH:mm:ss')",
"destination": "_tenant.actionTimestamp"
}

 

Avatar

Community Advisor

Glad you were able to resolve @Prateek-Garg !

Avatar

Employee

@Prateek-Garg 

 

Glad you were able to solve the issue.  When using the source type of attribute the source of the data did not transform to the new format.  Using Expression can apply an expression upon the source to meet the target.