Member since
07-10-2023
25
Posts
1
Kudos Received
0
Solutions
12-29-2023
05:25 AM
Hi @SAMSAL your solution is workink, thank you so much!
... View more
12-28-2023
06:13 AM
Hi guys! I have json like that: { "id" : "20", "user" : { "name" : "John", "date" : "" } } I transform this date to Long using nifi langugage ${date:isEmpty():ifElse('',${date:toDate('yyyy-MM-dd HH:mm:ss'):toNumber()})} and after this i do in jolttrasformation something like [ { "operation": "shift", "spec": { "idTransakcji" : "id", "date": "user.date", } }, { "operation": "modify-overwrite-beta", "spec": { "user": { "date": "=toLong(@(1,date))" } } } ] and it works. But I have problem beacause when I have emptyString in this date i need to transfer it in null(not null in String) and i dont know how to do it using JoltTransformation or something else so as not to lose what I already have and have null only when there is an empty string.
... View more
Labels:
- Labels:
-
Apache NiFi
12-18-2023
05:49 AM
Hi @SAMSAL , Yes i can convert negative value back but i need to send this date as long to other system and this is my problem with converting this date to long in nifi using toNumber() because my value is negative
... View more
12-18-2023
05:01 AM
@SAMSAL Thank you for help, everything works unfortunately except the date, but as you said, it is more complicated
... View more
12-18-2023
02:57 AM
Hi guys, I have some problems with transform date from string to long in NIFI. I have date like this: "02-01-1968|" and I need to transform this to long. i am using UpdateAttribte Processor to format it to number like this: ${my_date:toDate("dd-MM-yyyy","GMT"):toNumber()})} but I have result like this: "my_date" : -63072000000 .Does anyone know how to solve this better?
... View more
Labels:
- Labels:
-
Apache NiFi
12-15-2023
05:22 AM
Hi guys! i have some problems with JoltTransformation in NIFI. I have plain json like that: { "id": "c47f79f5-77b1-45d1-91df-968c2fa3def8", "system" : "OP", "sourceSystem" : "DKG", "name" : "Agnes", "lastName" : "Smith", "mail" : "a.smith@gmail.com", "country" : "Australia", "city" : "Sydney", "street" : "Colorado", "building" : "23", "local" : "1', "paycheck" : "3456,98', "joiningDate" : "12-09-2023", "isOfAge": "true", } And i need to have output like this: { "paycheck":3456.98, "joiningDate":1702048486451, "person":{ "name":"Agnes", "lastName":"Smith", "mail":"a.smith@gmail.com", "isOfAge":true, "adress":{ "country":"Australia", "city":"Sydney", "street":"Colorado", "building":"23", "local":"1" } }, "system_data":{ "id":"c47f79f5-77b1-45d1-91df-968c2fa3def8", "system":"OP", "sourceSystem":"DKG" } } In addition to nesting, I need to convert date to long, paycheck to double and isOfAge to boolean.I tried use JoltTransformation and Jolt Specification like this: [ { "operation":"shift", "spec":{ "paycheck":"paycheck", "joiningDate":"joiningDate", "name" : "person.name", "lastName" : "person.lastName", "mail" : "person.mail", "isOfAge" : "person.isOfAge", "country" : "person.adress.country", "city" : "person.adress.city", "street" : "person.adress.street", "building" : "person.adress.building", "local" : "person.adress.local", "id" : "system_data.id", "system" : "system_data.system", "sourceSystem" : "system_data.sourceSystem" } }, { "operation": "modify-overwrite-beta", "spec": { "paycheck": "=toDouble", "joiningDate": "=toNumber", "isOfAge": "=toBoolean" } } ] Nesting works but type conversion not. What am I doing wrong because i admit that jolt is little bit complicated for me
... View more
Labels:
- Labels:
-
Apache NiFi
10-18-2023
12:58 AM
@cotopaul it turned pout that this type in databyse is RAW not vairchar
... View more
10-17-2023
07:30 AM
@cotopaul when i change strategy to RecordPathValue i have something like this: "UUID_1" : "����}ZM�]����!p",
... View more
10-17-2023
07:22 AM
@cotopaul I write correct syntax but it didn't work 😕 But in UpdateRecord processor Replacement Value strategy should be on Literal Valu or Record Path Value?
... View more
10-17-2023
06:43 AM
@cotopaul and without this property UUID now is like that: [118, 90, 123, 96, -61, 100, -20, 76, -89, -95, -64, -105, -43, -106, -111, 69]
... View more