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.

Concatenate Date and Time in a signle field DTIME with NIFI

Solved Go to solution
Highlighted

Concatenate Date and Time in a signle field DTIME with NIFI

New Contributor

Using a JSON Records File: HOW to concatenate two attributes (Date and TIME) in a single attribute called DATE_TIME and delete the originals attributes.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Concatenate Date and Time in a signle field DTIME with NIFI

Super Guru

@HENI MAHER

Use Update Record processor and use concat function on Date and TIME attributes then in Record Writer avro schema don't mention the original attributes.

Refer to this link for more details regards to Update Record processor.

(or)

1.Another way is to extract the attribute value from the content and keep as Flowfile Attribute(using ExtractText,EvaluateJson..etc) processors then

2.Use Update Attribute processor and add new property in update attribute processor as

 ${Date}${TIME}

in Delete attributes list property value add your original attribute name.

2 REPLIES 2

Re: Concatenate Date and Time in a signle field DTIME with NIFI

Super Guru

@HENI MAHER

Use Update Record processor and use concat function on Date and TIME attributes then in Record Writer avro schema don't mention the original attributes.

Refer to this link for more details regards to Update Record processor.

(or)

1.Another way is to extract the attribute value from the content and keep as Flowfile Attribute(using ExtractText,EvaluateJson..etc) processors then

2.Use Update Attribute processor and add new property in update attribute processor as

 ${Date}${TIME}

in Delete attributes list property value add your original attribute name.

Re: Concatenate Date and Time in a signle field DTIME with NIFI

New Contributor

Thank You@Shu

You find enclosed the screenShot of the two proposals...but the result is the same...


capture-decran-de-2018-10-24-14-25-20.pngcapture-decran-de-2018-10-24-14-25-16.pngcapture-decran-de-2018-10-24-14-25-29.pngcapture-decran-de-2018-10-24-15-04-28.pngcapture-decran-de-2018-10-24-15-06-05.png
Don't have an account?
Coming from Hortonworks? Activate your account here