Issue in mapping Date-Time attribute from a csv file to a DateTime column in an Experience Event dataset | Community
Skip to main content
Level 2
February 18, 2025
Solved

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

  • February 18, 2025
  • 2 replies
  • 725 views

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
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Prateek-Garg

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"
}

 

2 replies

Level 2
February 19, 2025

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

 

Please let me know.

 

Thanks.

Prateek

Prateek-GargAuthorAccepted solution
Level 2
February 19, 2025

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"
}

 

DavidRoss91
Community Advisor
Community Advisor
February 19, 2025

Glad you were able to resolve @prateek-garg !