Change timestamp to text without having to specify every column

Hi EM Folks,

I have a project that exports 78 tables into flat files that are imported into our analytics warehouse. My issue is that the warehouse doesn’t seem to recognize the timestamp format correctly. Is there a way without having to create 78 actions that would let me change the data type of the column if it is a timestamp column?

My initial thought was to somehow attack this using table metadata but not sure if that is going to lead me down a rabbit hole or not, your thoughts as to the best approach?

Thanks,

Keith

Hello Keith,

Can you post a sample project/data?

Are you familiar with iterations in EasyMorph? It seems that you’re exporting 78 tables individually, if this export could be done inside an iterating module, you would only have to include the action to change the data type once, and it would apply to all the iterations.

Regards,

Roberto

Hi Keith,

How would you identify columns that need to be converted?

Sorry for any confusion - I think I actually found my issue. I was using an iteration to process the table and then outputting the table to a pipe delimited flat file but I did not select the “preserve formatting” advanced option so EM translated all my Postgres timestamps to what appears to be some sort of decimal format that doesn’t allow Redshift to see them as a valid timestamp for some reason. I am testing the files again with that option selected to verify the results.

Yes, if this option is not selected, EasyMorph outputs dates as numbers which are the same as Excel dates – i.e. the number of days since January 1st, 1900.