Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Querydatabase processor on teradata db adds millis seconds in logTime when logtime is used for incremental fetch

Solved Go to solution
Highlighted

Querydatabase processor on teradata db adds millis seconds in logTime when logtime is used for incremental fetch

Contributor

Hi All,

Thanks a lot to this awesome community.

using QueryDatabaseprocessor to fetch data from a teradata db table where logtimestamp is used for incremental fetch. the format for this timestamp is timestamp(0) but it stores the state and add milii seconds for example my timestamp is in the DB

2017-11-11 20:30:32

and when the querydatabase porcessor stores the state, it is

2017-11-11 20:30:32.0

so when next time it queries to get incremental data it gives an error invalid time stamp

any help or suggestion

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Querydatabase processor on teradata db adds millis seconds in logTime when logtime is used for incremental fetch

Super Guru

@dhieru singh

In Maximum-value columns use cast or some other functions that can change the format of 2017-11-11 20:30:32.0 to 2017-11-11 20:30:32

42609-query.png

in this screenshot i did cast on the filed name to date and when i see the view state then the processor having just date as the last value.

State:-

42610-state.png

Like this way you need to prepare the max value column that can store as 2017-11-11 20:30:32 not with the milliseconds.

3 REPLIES 3

Re: Querydatabase processor on teradata db adds millis seconds in logTime when logtime is used for incremental fetch

Contributor

@Shu @Bryan Bende

any idea, please help Thanks Dheeru

Re: Querydatabase processor on teradata db adds millis seconds in logTime when logtime is used for incremental fetch

Super Guru

@dhieru singh

In Maximum-value columns use cast or some other functions that can change the format of 2017-11-11 20:30:32.0 to 2017-11-11 20:30:32

42609-query.png

in this screenshot i did cast on the filed name to date and when i see the view state then the processor having just date as the last value.

State:-

42610-state.png

Like this way you need to prepare the max value column that can store as 2017-11-11 20:30:32 not with the milliseconds.

Re: Querydatabase processor on teradata db adds millis seconds in logTime when logtime is used for incremental fetch

Contributor

@Shu this worked Thanks a lot, appreciate it

Don't have an account?
Coming from Hortonworks? Activate your account here