Member since
05-04-2023
3
Posts
0
Kudos Received
0
Solutions
05-05-2023
09:25 PM
@SAMSAL this is my template, could you help me try at your side,please? thanks https://drive.google.com/file/d/1XOwQV1ujDhiSHvD_uBovYoyN1MzVMJBX/view?usp=sharing
... View more
05-05-2023
03:31 AM
@SAMSAL I did the same but it did not work as expected. do you have any special configuration for JsonTreeReader and JsonRecordSetWritter? The field “output_channel” was not inserted.
... View more
05-04-2023
07:29 AM
I have 1 JSON FlowFile A (taken from 1 invoke HTTP processor) and 1 Json FlowFile B (also from 1 invoke HTTP processor). The problem I need to solve is to merge/combine/join them into 1 FlowFile C, whose schema is the sum of 2 Flow files A and B. I have tried using JoinEnrichment or MergeContent solution but with no success. Do you have any suggestions? FlowFile A {
"id" : "CAT_c6848199-3594-453b-a733-c270bb837933",
"categoryId" : "category-external-id-456",
"updatedDate" : "2023-04-25T09:25:07.559Z",
"title" : {
"en-US" : "Industrial",
"vi-VN" : "Research and Development"
},
"parentCategory" : null,
"order" : 2,
"description" : {
"en-US" : "Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh.",
"vi-VN" : "Nulla mollis molestie lorem. Quisque ut erat."
},
"mediaUrls" : [ "http://dummyimage.com/239x100.png/5fa2dd/ffffff", "http://dummyimage.com/104x100.png/ff4444/ffffff" ],
"flexibleAttributes" : { },
"seoTitle" : {
"en-US" : "Books",
"vi-VN" : "Support"
},
"seoKeywords" : {
"en-US" : [ "augue", "lectus in quam fringilla rhoncus" ],
"vi-VN" : [ "nec dui luctus", "nulla sed" ]
},
"seoDescription" : {
"vi-VN" : "Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia.",
"en-US" : "Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est."
},
"updatedDateExternal" : null,
"hashValue" : "e46e4c499f9a738c",
"channelId" : "bfc12c9e-821d-4351-93db-4092508f5a6e"
} Flowfile B {
"output_channels": [
"24194622-e1b1-11ed-860f-325096b39f47",
"241947f8-e1b1-11ed-847a-325096b39f47",
"24194866-e1b1-11ed-98dc-325096b39f47",
"241948c0-e1b1-11ed-9370-325096b39f47",
"24194906-e1b1-11ed-95f0-325096b39f47",
"2419494c-e1b1-11ed-a8f9-325096b39f47",
"24194992-e1b1-11ed-8da8-325096b39f47",
"241949ce-e1b1-11ed-9f22-325096b39f47",
"24194a14-e1b1-11ed-a030-325096b39f47",
"24194b9a-e1b1-11ed-bfd2-325096b39f47"
]
} And the flowfile C I would like to have inserts field “output_channels” from Flow File B into a new field of FlowFile A {
"id" : "CAT_c6848199-3594-453b-a733-c270bb837933",
"categoryId" : "category-external-id-456",
"updatedDate" : "2023-04-25T09:25:07.559Z",
"title" : {
"en-US" : "Industrial",
"vi-VN" : "Research and Development"
},
"parentCategory" : null,
"order" : 2,
"description" : {
"en-US" : "Aenean fermentum. Donec ut mauris eget massa tempor convallis. Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh.",
"vi-VN" : "Nulla mollis molestie lorem. Quisque ut erat."
},
"mediaUrls" : [ "http://dummyimage.com/239x100.png/5fa2dd/ffffff", "http://dummyimage.com/104x100.png/ff4444/ffffff" ],
"flexibleAttributes" : { },
"seoTitle" : {
"en-US" : "Books",
"vi-VN" : "Support"
},
"seoKeywords" : {
"en-US" : [ "augue", "lectus in quam fringilla rhoncus" ],
"vi-VN" : [ "nec dui luctus", "nulla sed" ]
},
"seoDescription" : {
"vi-VN" : "Aenean auctor gravida sem. Praesent id massa id nisl venenatis lacinia.",
"en-US" : "Nulla neque libero, convallis eget, eleifend luctus, ultricies eu, nibh. Quisque id justo sit amet sapien dignissim vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla dapibus dolor vel est."
},
"updatedDateExternal" : null,
"hashValue" : "e46e4c499f9a738c",
"channelId" : "bfc12c9e-821d-4351-93db-4092508f5a6e",
"output_channels": [
"24194622-e1b1-11ed-860f-325096b39f47",
"241947f8-e1b1-11ed-847a-325096b39f47",
"24194866-e1b1-11ed-98dc-325096b39f47",
"241948c0-e1b1-11ed-9370-325096b39f47",
"24194906-e1b1-11ed-95f0-325096b39f47",
"2419494c-e1b1-11ed-a8f9-325096b39f47",
"24194992-e1b1-11ed-8da8-325096b39f47",
"241949ce-e1b1-11ed-9f22-325096b39f47",
"24194a14-e1b1-11ed-a030-325096b39f47",
"24194b9a-e1b1-11ed-bfd2-325096b39f47"
]
} Thanks
... View more
Labels:
- Labels:
-
Apache NiFi