Support Questions

Find answers, ask questions, and share your expertise

Extract current time

avatar
Explorer

Dears,

 

   How can I extract current time in Nifi and load into a column of a table in database

 

Thankyou!

1 ACCEPTED SOLUTION

avatar

hi @ushasri,

Can you provide some more details about your flow? Without knowing what you are doing in your flow, I can only tell you that you can use the Expression Language from NiFi and extract the current time send it into your stream. The current time can be called as an example like:

${now():toNumber():format('yyyy-MM-dd')} 

Next, you can use an UpdateRecord Processor, add the attribute to your newly defined column and send it to further processing.
More about NiFi's Expression Language: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html

View solution in original post

1 REPLY 1

avatar

hi @ushasri,

Can you provide some more details about your flow? Without knowing what you are doing in your flow, I can only tell you that you can use the Expression Language from NiFi and extract the current time send it into your stream. The current time can be called as an example like:

${now():toNumber():format('yyyy-MM-dd')} 

Next, you can use an UpdateRecord Processor, add the attribute to your newly defined column and send it to further processing.
More about NiFi's Expression Language: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html