Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Prakhar1
Creator III
Creator III

Reading time in CSV file using Dynamic schema

Hi,

I have csv file having data like :

"StatusID","StatusName","CreatedDateTime","UpdatedDateTime"

"0","Active","6/26/2019 10:12:45 AM","6/26/2019 10:12:45 AM"

Now i want to read columns using "Dynamic" type but it is taking the

"CreatedDateTime" and "UpdatedDateTime" columns as "String" which i want to be in "Timestamp", because the target table columns are in "Timestamp" datatype.

Any idea what can i do here or i need to change target column type?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

@prakhar dubey​ , can you take a look at this blog written by Richard, it shows how to get the column metadata properties and change them on tJavaFlex.

 

Regards

Shong

View solution in original post

8 Replies
vikramk
Creator II
Creator II

Hi @prakhar dubey​ ,

When you use Dynamic schema at source component you should be using dynamic at target as well. Or else define the schema manually at source and target.

Still If you have specific requirement to do so, then you can convert the type. But that is not best practice with Dynamic schema.

Please let me know if it helps.

Prakhar1
Creator III
Creator III
Author

Yes i have used the dynamic on both the side.

Yes how can i convert the type in dynamic

Anonymous
Not applicable

Hello,

Is it possible for you to use the tMap component to map the Dynamic type column to a Date? In this way, you will not use Dynamic type at your target.

Best regards

Sabrina

Anonymous
Not applicable

@prakhar dubey​ , can you take a look at this blog written by Richard, it shows how to get the column metadata properties and change them on tJavaFlex.

 

Regards

Shong

Prakhar1
Creator III
Creator III
Author

Sorry @Xiaodi Shi​ but i am not getting what you want to explain..

Prakhar1
Creator III
Creator III
Author

@Shicong Hong​ sure i will try to check it on my side and will respond if it works for me.

Prakhar1
Creator III
Creator III
Author

thanks @Shicong Hong​ made some couple of changes in the code and it worked for me

Anonymous
Not applicable

@prakhar dubey​ , Wow, it's great! Would you mind sharing some example code of tJavaFlex what you have changed? It will be helpful for the community users who might have the same issues.

 

Regards

Shong