Date format is changing while extraction from Oracle

Five Stars

Date format is changing while extraction from Oracle

Hi,

 

I've extracting data from oracle and storing into csv file.

There is one date column field where date comes in this format "01-12-2017 21:51:42"

 

But what happens some time while extraction data in csv files date comes like this "2017-12-01 21:51:42", so my further process gets failed. But when I do extraction again it comes fine with this format "01-12-2017 21:51:42".

 

Mat I know please what could be reason for this fluctuation ? I always check the DB when I get wrong date format in csv but in DB it always shows the correct only "01-12-2017 21:51:42".

 

Any Suggestions..!

Fifteen Stars TRF
Fifteen Stars

Re: Date format is changing while extraction from Oracle

Hi,

Looks strange!

I suggest you to include a date format for those queries such as:

TO_CHAR(yourDateColumn, 'DD-MMYYYY HH24:MI:SS')

This will ensure the output format.


TRF
Forteen Stars

Re: Date format is changing while extraction from Oracle

After extraction are you openning  csv file ? to avoid this kind of issue please open in Notepad++.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: Date format is changing while extraction from Oracle

Hi @TRF

 

I can't use your logic because am using dynamic schema. I'm loading multiple tables one by one and in every table date column name is different.

 

I'm using multi-threading, Do you think so it could be the issue...?

Five Stars

Re: Date format is changing while extraction from Oracle

@manodwhb, I always follow this to check exact date format. But I can see the change in date pattern sometimes.
Forteen Stars

Re: Date format is changing while extraction from Oracle

Can you post your job design here?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog