Member since
11-23-2021
4
Posts
0
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1570 | 11-24-2021 12:25 AM | |
2697 | 11-23-2021 07:25 AM |
11-24-2021
12:25 AM
This task has been successfully solved! The required Jolt construction is shown below. [ { "operation": "shift", "spec": { "*": { "table_name": "&", "*": "data[&1].&" } } }, { "operation": "cardinality", "spec": { "table_name": "ONE" } } ]
... View more
11-23-2021
07:25 AM
Thank you for your answer! All my json FlowFiles have a FlowFile attribute on them for "table_name". There may be a problem with the json schema itself. Now the task has changed. I have created a new question about Jolt. https://community.cloudera.com/t5/Support-Questions/Jolt-transform/td-p/330850 If you know the answer to it, I would be very grateful!
... View more
11-23-2021
07:23 AM
Hello everyone! I need a help in Jolt transform. I have array, that consist from many json objects. (https://jolt-demo.appspot.com/ ) [ { "table_name": "table_vd", "scratch_name": "l1_sample_1_1", "scratch_order": 1 }, { "table_name": "table_vd", "scratch_name": "l1_sample_1_1", "scratch_order": 34 }, { "table_name": "table_vd", "scratch_name": "l1_sample_2", "scratch_order": 3 } ] What transformation of Jolt needs to be done to get the following result? Now i have next Jolt construction. [ { "operation": "shift", "spec": { "*": { "table_name": "table_name", "*": { "@0": "data[0].&1" } } } } ] But the result is not correct.
... View more
Labels:
- Labels:
-
Apache NiFi
11-23-2021
01:55 AM
Hello everyone! I have many json files like this: { "table_name" : "train_vd", "data" : [ { "battery_power" : 1954, "clock_speed" : 0.5 } ] } { "table_name" : "train_vd", "data" : [ { "battery_power" : 842, "clock_speed" : 2.2 } ] } ... I used the MergeContent and MergeRecord processors and used the table_name field as the Correlation Attribute Name (i have ${table_name} attribute). However, this does not work and the result is as follows: [{ "table_name" : "train_vd", "data" : [ { "battery_power" : 509, "clock_speed" : 0.6 } ] }{ "table_name" : "train_vd", "data" : [ { "battery_power" : 842, "clock_speed" : 2.2 } ] }] ... However, I want to get the following result: [{ "table_name" : "train_vd", "data" : [ { "battery_power" : 509, "clock_speed" : 0.6 }, { "battery_power" : 842, "clock_speed" : 2.2 }] }] May you tell me how to solve this problem? Need i use a complex Jolt transformation or to configure the incoming Avro schema in the MergeRecord processor, so that then everything is combined using a single field?
... View more
Labels:
- Labels:
-
Apache NiFi