Add New Column (Expressions, Date time)

Hi Guys,

I have just started exploring Knime for ETL.
I am coming from Informatica, SSIS and Alteryx background.

I am finding it quite difficult to add new columns with every row along with expressions.

For example, for everyrow I store in oracle table, I want its Date time stored aong with that row in a dedicated column (assume it as Load_Date).

Also, where do I write expressions for such new columns ?

Any tips appriciated.

Cheers,
Vir

Hi @kotvir ,

To add a column with the timestamp you can use the Create Date&Time Range node.
For Expresions there are nodes like “Column Expressions” and “Math formula”.

Regards

1 Like

Hi, I did create date range, but it’s creating for one row. As I mentioned I need for each row as a derrived column. For each row being generated from source, I need a column like Load_Date as current date time.

Hi @kotvir
You can do something like this Append timestamp.knwf (1.5 KB)

Regards

Hi @andrejz , this wf is not opening.

Hi,

Maybe was something wrong during the export … Append timestamp.knwf (18.0 KB)

image

Hi @andrejz , this gives me constant value of date and time, I need the exact date time with seconds and m seconds with every row reaching destination

Hi @kotvir

I do not know if is the best solution but you have to use a loop for every row, do the calculations and then register the time of execution and append a column. In my example the “Wait” node is just for simulate the execution of the workflow.

Append timestamp.knwf (19.0 KB)

Hope this helps

Hello @kotvir,

and welcome to KNIME Community!

It’s not possible to create/have such load timestamp for each row in DB table from within KNIME. Best you can do is what @andrejz suggested - same timestamp for all records. To have load timestamp you have to create such column(s) in database:

Additionally have a look at this topic where KNIME ETL capabilities are discussed:

Br,
Ivan

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