Converting Dates during ETL procedures

KNIME Community

I am performing (well learning really) an ETL procedure using KNIME and I have a date attribute. I need to create additional attributes such as year, month, quarter, etc. How would I do that?

Hi @reichmaj,

use this node … Extract Date&Time Fields

Best regards
Andrew

5 Likes

Thank you Andrew. I did find that Node. However I keep getting the following error

ERROR Database Writer (legacy) 2:15 Execute failed: java.lang.RuntimeException: Column "contb_receipt_dt" of type "Local Date" from input does not match type "date" in database at position 1

Is it telling me I have a attribute type mismatch?

Untitled

Node 12: I’m filtering on column name “contb_recipt_dt,” which is a text string formated as yyyy.-mm-dd
Node 16: Converting string date (csv file was read in) to a date using format yyyy-MM-dd
Node 32: extracting the Year, Quarter, Month(number) and Day of Week (number)
Node 14: renaming the columns from Node 32 to match my database columns
Node 13: Group by the unique values
Node 15: writing to DB – and error/???

Hi @reichmaj,

use this node to retype your local Date column … Date&Time to legacy Date&Time

Best regards
Andrew

1 Like

Hi there @reichmaj,

legacy database nodes support legacy Date&Time types whereas the new database nodes support new Data&Time type.

I recommend you to switch to new database nodes.

Br,
Ivan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.