Member since
07-22-2020
3
Posts
0
Kudos Received
0
Solutions
08-31-2020
07:15 AM
Currently I am having around 15 attributes in my flowfile. Out of these 15, i only want a few (all the attributes that have a prefix 'error_' in it. These 'error_*' attributes can have 2 sets of values, eighter- 'valid' or some error code, say- '945'. Now i want to iterate though all the attributes with prefix - 'error_' and if its value is 'valid', do nothing and if its value is having some error code, append the error code to a string separated by ';'. So basically, if I have 5 error_ attributes: error_field1: '123'
error_field2: 'Valid'
error_field3: '567'
error_field4: 'Valid'
error_field5: '45' I want my output as - '123;567;45'. Please help me as i am new to Nifi and i am not sure on how to work with such complex EL.
... View more
Labels:
- Labels:
-
Apache NiFi
08-12-2020
03:42 AM
I am currently using nifi to transfer my data from RDS to DocDB. Now to put data into DocDB i am not using PutMongo, but using Python code. Now there are certain date fields from RDS which are in int format that must be stored in MongoDB in ISO date format. I tried converting it to date in my JSON Schema, but that stored date fields as YYYY-MM-DD as a string i.e even though those fields were in correct format, the corresponding data type was string and not date. Now ideally i can directly typecast my datatype to date in my Python code that pushes values to docDB, but please note that i need a solution for it in NiFi. Essentially, my flow has EXecuteMYSQLRecord(where i tried my JsonSchema as date), followed by JOLT to transform data into required hierarchy to be stored in docDB, followed by python code to insert into DocDB. Kindly help with a solution for converting date to ISO format in NiFi.
... View more
Labels:
- Labels:
-
Apache NiFi
07-22-2020
12:25 AM
I am having a case in my current flow where i want to evaluate certain attributes in my flow file. This is current structure of my flowfilw: {
Attribute1: Value
Attribute2: Value
.
Attribute k: Value
.
} (i) So say for example, evaluate if attribute 2 is an integer of length 9. If it isn't Set the value of Attribute k to 'not valid'. What processor or a combination of processor (maximum of 2) can i use to do this? Also can you write the underlying Expression Language for the case i just mentioned as i am new to this technology and i need to get it done soon.
... View more
Labels:
- Labels:
-
Apache NiFi