Does CDP converts the Data Type of the Source as Set up in the Schema? | Community
Skip to main content
Level 3
October 5, 2023
Solved

Does CDP converts the Data Type of the Source as Set up in the Schema?

  • October 5, 2023
  • 2 replies
  • 1226 views

Hi Team,

 

If Snowflake is the source connection to CDP and LoginDate field is a Varchar in snowflake View 'ABC' - when dataflow is created for the View ABC to ABC Schema in CDP, and the data type of field LoginDate is set up as DateTime in Schema.. will CDP automatically convert the data type of that Varchar field in source to DateTime in CDP during ingestion?

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 jayakrishnaaparthasarathy

Hi @mansibedi Yes, AEP doesn't perform any conversion on data type here. You can request the source team to change the datatype for the date field. Also, wondering that did you get any error on mapping these fields? would like to know. 

2 replies

Level 2
October 5, 2023

Ingestion wont convert the string automatically, during the ingestion there is option to add calculated field, using the data prep function and then assign the schema field to the calculated fields

Example:

Syntax: date(DATE, FORMAT, DEFAULT_DATE) 

e.g.date(“2019-10-23 11:24”, “yyyy-MM-dd HH:mm”, now())

 

I hope this would be helpful.

mansibediAuthor
Level 3
October 9, 2023

thanks @hariprasathg that is helpful.

jayakrishnaaparthasarathy
Community Advisor
Community Advisor
October 9, 2023

Hi @mansibedi  - CDP doesn't perform any conversion. However, in your scenario it shouldn't be any issue as it was already a "DateTime" field and dataflow will be sooth from snowflake. 

mansibediAuthor
Level 3
October 9, 2023

@jayakrishnaaparthasarathy  the DateTime field is in CDP, but in the source data (snowflake in this case) - the data value is a Varchar. So CDP won't perform conversion in this case i believe? 

 

Snowflake View ABC -----------------------> source ingestion ----->  CDP Schema ABC 

(field name - loginDate)                                                              (field name - loginDate) 

(data type - varchar)                                                                   (data type - DateTime)

jayakrishnaaparthasarathy
Community Advisor
jayakrishnaaparthasarathyCommunity AdvisorAccepted solution
Community Advisor
October 10, 2023

Hi @mansibedi Yes, AEP doesn't perform any conversion on data type here. You can request the source team to change the datatype for the date field. Also, wondering that did you get any error on mapping these fields? would like to know.