Member since
07-29-2020
574
Posts
323
Kudos Received
176
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2161 | 12-20-2024 05:49 AM | |
| 2458 | 12-19-2024 08:33 PM | |
| 2207 | 12-19-2024 06:48 AM | |
| 1473 | 12-17-2024 12:56 PM | |
| 2112 | 12-16-2024 04:38 AM |
07-24-2023
02:29 PM
1 Kudo
Hi @maglinvinn , To get the expected result, you need to convert the string type datetime to datetime type before calling the toNumber() function. The conversion can be done using the toDate() function (see: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#todate ), For example the arrivaltimeinmillis will have the following value: ${timearrival:toDate("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"):toNumber()} If you find this is helpful, please accept solution. Thanks
... View more
07-24-2023
02:12 PM
hi @Ytch , To use the PutDatabaseRecord you need to have the column names defined in whatever input format you have (CSV, Json....etc.) and the column name should match what is in the DB table ( see also the "Translate Field Option" if not exactly the same). If you know the column order in the CSV file you can add a header using the ReplaceText processor as described here: https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285457 If you find this is helpful please accept solution. Thanks
... View more
07-24-2023
06:36 AM
1 Kudo
Hi @VaibhavK , You can try the following spec: [
{
"operation": "shift",
"spec": {
"cells": {
"*:*": "&(0,2)"
}
}
}
] ref: https://community.cloudera.com/t5/Support-Questions/Dynamically-renaming-JSON-field-names-in-NiFi/td-p/226223 If you find this is helpful please accept solution. Thanks
... View more
07-21-2023
07:49 AM
Hi @CommanderLaus , If you do anything manually with the processor you are trying to change its Running State through the API, then yes the revision will be updated. In my case what I do is basically the first API InvokeHttp is to get the latest revision using the following GET API: https://localhost:8443/nifi-api/processors/${pipeline.start.processor.id} This will give the following response where you can parse the latest "version" value using something like EvaluateJsonPath processor and store the value in an attribute: {
"revision": {
"clientId": "value",
"version": 0,
"lastModifier": "value"
},
"id": "value",
"uri": "value",
"position": {…},
"permissions": {…},
"bulletins": [{…}],
"disconnectedNodeAcknowledged": true,
"component": {…},
"inputRequirement": "value",
"status": {…},
"operatePermissions": {…}
} Then use extracted version attribute to build the next API post Body , for example in my case I use ReplaceText processor to generate the post body : {
"revision": {
"clientId": "${pipeline.start.processor.id}",
"version": ${processorVersion}
},
"state": "...",
"disconnectedNodeAcknowledged": true
} Hope that helps.
... View more
07-21-2023
06:28 AM
1 Kudo
Hi @CommanderLaus , Are you sure that your post data is correct? It needs to be in the following format: {
"revision": {
"clientId": "value",
"version": 0,
"lastModifier": "value"
},
"state": "value",
"disconnectedNodeAcknowledged": true
} yours looks like this: {
"revision": {
"version": 18,
"clientId": "01891026-da00-199f-9dc9-ae3a37dce067"
},
"status": {
"runStatus": "RUNNING"
},
"component": {
"id": "0189100e-1e29-115c-ec96-b857cd155f4a",
"state": "RUNNING"
},
"id": "0189100e-1e29-115c-ec96-b857cd155f4a"
} refer to : https://nifi.apache.org/docs/nifi-docs/rest-api/index.html If that helps please accept solution. Thanks
... View more
07-20-2023
08:33 AM
@MattWho, @steven-matison , @cotopaul ...Can you guys help with this?
... View more
07-20-2023
07:15 AM
1 Kudo
Hi @Paulito, I noticed you are using JsonPathReader vs JsonTreeReader which what I used. I'm not if the Path Reader is the right choice and if so how to configure correctly. I tried it in my test environment against your input with different JSONPath config and it did not work for me. Can you use JsonTreeReader instead?
... View more
07-20-2023
06:44 AM
1 Kudo
Hi @ShaniKumar , Can you please identify clearly with the issue is to help you better? Basically the InvokeHTTP processors allows you to use dynamic invocation using Nifi Expression Language (EL). You can set a flowfile attribute with the intended url before calling the InvokeHttp processor , for example: you can use UpdateAttribute to set the url to attribute name "UrlAttr" and then reference this attribute in the InvokeHttp "Remote URL" property value as ${UrlAttr}. Other InvokeHttp properties allows to use EL to set the value dynamically and so on as long as the property allows it. Hope that helps. Thanks
... View more
07-20-2023
06:34 AM
@PradNiFi1236, Is the invoice number unique? If the filename matches between the two format, have you tried using this instead? Of course you have to derive just the filename without the extension in another attribute first and then use the new attribute for the Correlation Attribute. Also try resetting the "Minimum Number of Entries" to 1 . If none of that helped can you please post screenshot of the mergeContent processor configurations with other critical processors configurations as well. Thanks
... View more
07-19-2023
01:08 PM
Hi @Dataengineer1 , This has been asked before , please refer to : https://community.cloudera.com/t5/Support-Questions/NIFI-Is-it-possible-to-make-a-x-www-form-urlencoded-POST/m-p/339398 Thanks
... View more