Expand my Community achievements bar.

Check out the 3rd Edition of the AEP Community Lens for all the latest releases, resources, and Community updates

Source date transformation to timestamp

Avatar

Level 4

Hi

I am trying to convert a date from the source system to AEP timestamp in Event dataset. The source contains data like 2022-11-21T05:00:00 with a T in between date and time. I have added a data prep function date(source_date,"yyyy-MM-ddTHH:mm:ss") to convert it into Timestamp. After doing this mapping i see No error and in preview data everything looks ok. However as soon as i start the import process the import process fails and i can see error in the monitoring section "Error transforming data for required destination path timestamp. Details: com.adobe.aep.aexl.jexl.AexlScriptEngine$AepJexlEngine.parse@1:5 Unable to resolve function/method 'date' with the specified parameters. Please verify the function name, parameter count and parameter type." I am not sure why this error is showing up when in preview data everything looks good

 

Can someone help me how can i proceed now?

 

I also tried to update the source_date using substr and replacestr functions but it looks like you can't use this function inside date.

 

Many thanks!

 

1 Reply

Avatar

Employee

Hi @arpang16406580 

 

I think you have some values in the file which doesn't follow the format "yyyy-MM-ddTHH:mm:ss" or you may have values which follows single digit parameter [Ex : 2022-1-2T05:00:00 --> date(source_date,"yyyy-M-dTHH:mm:ss")]. I would suggest you can use partial ingestion method or try to insert single record to confirm logic wise it's correct but issue is within the data. 

 

Regards,

Arijit Ghosh