Member since
07-29-2020
574
Posts
323
Kudos Received
176
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2155 | 12-20-2024 05:49 AM | |
| 2454 | 12-19-2024 08:33 PM | |
| 2201 | 12-19-2024 06:48 AM | |
| 1465 | 12-17-2024 12:56 PM | |
| 2110 | 12-16-2024 04:38 AM |
05-08-2023
12:48 PM
Hi, I believe this spec would help with setting the date as default date in each array element: [
{
"operation": "modify-overwrite-beta",
"spec": {
"FatturaElettronicaBody": {
"DatiGenerali": {
"DatiDDT": {
"NumeroDDT": "=split('[,]',@(1,NumeroDDT))"
}
}
}
}
},
{
"operation": "shift",
"spec": {
"FatturaElettronicaBody": {
"DatiGenerali": {
"DatiGeneraliDocumento": "FatturaElettronicaBody.DatiGenerali.&",
"DatiDDT": {
"NumeroDDT": {
"*": {
"@": "FatturaElettronicaBody.DatiGenerali.DatiDDT[&1].NumeroDDT",
"@(3,DatiGeneraliDocumento.Data)": "FatturaElettronicaBody.DatiGenerali.DatiDDT[&1].Date"
}
}
}
}
}
}
}
] If that helps please accept solution.
... View more
05-08-2023
10:27 AM
1 Kudo
What is the "Completion Strategy" property under FetchSFTP is set to? If its set to the default "None" then the file should not be deleted or moved. See the Completion Strategy options under: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.20.0/org.apache.nifi.processors.standard.FetchSFTP/index.html If that helps please accept solution.
... View more
05-08-2023
09:47 AM
if what you provided seems to be giving you the expected output then you are good to go :).
... View more
05-08-2023
07:58 AM
Hi, See if this helps: [
{
"operation": "shift",
"spec": {
"header": {
"timeStamp": "records.inv_activity_ts",
"activityId": "records.inv_activity_id",
"action": "records.action"
},
"resource": {
"drniId": "records.inv_id",
"subtype": "records.inv_subtype",
"name": "records.inv_name",
"resourceCharacteristic": {
"*": {
"name": {
"status": {
"$": "records.status",
"@(2,value)": "records.matchingStatus_value"
},
"installDate": {
"@(2,value)": "records.installDate"
}
}
}
}
}
}
}
] If that helps please accept solution. Thanks
... View more
05-07-2023
05:05 PM
1 Kudo
@ThienTrinh, As workaround you can follow this scenario: https://stackoverflow.com/questions/55118389/i-have-two-json-payload-i-want-to-merge-them-in-a-single-json-object/55124212#55124212
... View more
05-06-2023
09:06 AM
1 Kudo
I can confirm that there is behavior change in Fork\Join Enrichment processors between 1.16 and 1.20. I have uploaded the same template you sent using 1.16 and it worked using 1.16 JsonTreeReader\Writer , however the same template did not work on 1.20 using 1.20 processors and services. @MattWho, @steven-matison Is this a bug or misunderstanding if how such processors and services should work in the later versions? Please advise. Thanks
... View more
05-05-2023
01:39 PM
2 Kudos
Hi, One of the main differences that I can see is that the QueryDatabaseTableRecord has a RecordWriter which allows you to to decide the format of the output (Json, xml, csv , parquet ...etc.) where a service need to be setup for the record writer depending on the format, while the QueryDatabaseTable will only provide an Avro format output without the need to setup any record writer service. This is similar to the case of processors ExecuteSQL vs ExecuteSQLRecord. Another important difference I see is the QueryDatabaseTable has property setting for "Transaction Isolation Level" while the other doesn't If that helps please accept solution. Thanks
... View more
05-05-2023
06:37 AM
Hi, I'm not seeing any difference in the JsonTreeReader\Writer . I'm not sure why you are not getting the expected output. The only difference I see is that I'm using 1.16 version and you are on 1.20 so I'm not sure if the behavior is different between the two versions even though I suspect its the case. To troubleshoot and find out , try to create the same flow I created and use the GeneratedFlowFile and ReplaceText to generate the output A & B from your post above. If that works then I would double check your original flow and make sure that InvokeHttp is generating the desired output and the same response output is making it to the ForkEnrichment\JoinEnrichment as designed. Let me know how that goes.
... View more
05-04-2023
10:48 AM
1 Kudo
Hi, I dont think there is a bug here. It all depends on the value you set in ReplaceText for the Evaluation Mode property. My guess is that you have set to the default value which is "Line-by-Line" which makes sense in this case because you have no lines. To make this work you need to set it to "Entire Text" instead as follows: If you want to check if the file coming from the ListFile to see if it has content or not and then route accordingly , you can use RouteOnAttribute to check against the built-in flow file attribute "fileSize" using expression language: ${fileSize:equals(0)} If that helps please accept solution. Thanks
... View more
05-04-2023
10:31 AM
Hi Not sure what Enrichment Strategy are you using but this can be accomplished using Join Strategy "Insert Enrichment Fields" with Insertion Record Path "/": Here is my data flow I'm using the GenerateFlowFile and the ReplaceText to simulate generating Flow File A & B respectively. The output of JoinEnrichment : [ {
"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" ]
} ] If that helps please accept solution. Thanks
... View more