Member since
07-29-2020
574
Posts
322
Kudos Received
176
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1377 | 12-20-2024 05:49 AM | |
1574 | 12-19-2024 08:33 PM | |
1423 | 12-19-2024 06:48 AM | |
1008 | 12-17-2024 12:56 PM | |
1318 | 12-16-2024 04:38 AM |
11-08-2022
12:44 PM
Hi, I'm only able to do that via two processors: 1- JotlTransfomJSON : this is to add desired attributes (attr_id & attr_name) to the flowfile json using the following spec: [
{
"operation": "shift",
"spec": {
"#${attr_id}":"attr_id",
"#${attr_name}":"attr_name",
"model": "model",
"cars_drivers": {
"*": {
"id": "cars_drivers[#2].id",
"name": "cars_drivers[#2].name",
"is_processed": "cars_drivers[#2].is_processed"
}
}
}
}
] 2 - UpdateRecord Processor: Once the attributes are added to the Json , you can update those records Is_processed value only when the id matches the attr_id and name matches the attr_name. To do that set the following properties: a- Replacement Value Strategy: Literal Value b- /cars_drivers[*]/id[.=../../../attr_id]/../name[.=../../../attr_name]/../is_processed : 1 Hope that helps, if it does please accept solution.
... View more
10-20-2022
09:52 AM
Hi , Can you provide examples of the different json input?
... View more
10-16-2022
08:24 AM
Hi, I think you were close with the last option but did not use the correct syntax with null values where instead of '<> null', use 'is not null' as follows: select * from FLOWFILE where RPATH(fields, '/field') is not null However when I run that I got the correct result but for some reason a MapRecord Syntax is added to each array element : [ {
"fields" : [ "MapRecord[{field=field1}]", "MapRecord[{field=field1}]" ]
}, {
"fields" : [ "MapRecord[{field=field2}]", "MapRecord[{field=field2}]" ]
}, {
"fields" : [ "MapRecord[{field=field3}]", "MapRecord[{field=field3}]" ]
} ] Not sure why this happens but that should get you close to what you are trying to accomplish. Hope that helps. If it does, please accept solution. Thanks
... View more
10-13-2022
06:23 AM
Hi, Try the following Jolt spec: [
{
"operation": "shift",
"spec": {
"tags": {
"*": {
"tag": "tags.[#2].Parameter",
"value": "tags.[#2].value"
}
}
}
}
] If you find this helpful please accept solution.
... View more
10-13-2022
06:11 AM
Hi, I dont think there is a way to do that in one processor, check out this post around the problem with possible solution: https://community.cloudera.com/t5/Support-Questions/Unable-to-return-a-scalar-value-for-the-expression-from-NIFI/td-p/213677 If you find this helpful please accept solution.
... View more
09-28-2022
05:10 PM
Hi, Based on the link below , it doesnt seem like you can access the variable registry directly from an ExecuteScript processor. You can either use the API - as the referenced article in the link below- to retrieve the value or just use an UpdateAttribute processor to get the value of the variable using Expression Language and store into flowfile attribute before passing it to the groovy script where its easy to retrieve the incoming flowfile attribute. https://community.cloudera.com/t5/Support-Questions/NiFi-Is-it-possible-to-access-Processor-Group-variables/m-p/204283 If that helps please accept solution. Thanks
... View more
09-28-2022
06:13 AM
Hi, I dont think it matters which system the path is located as long you have access to it. Do you have access to the path \\10.1.1.35\nifi from the machine where nifi is deployed? I'm not Linux expert but you need to test if the path with the file name is accessible by doing some system command or trying to access via file explorer.
... View more
09-27-2022
09:16 AM
1 Kudo
Hi, Is it always the case that when you have one address you will have a map and if its multiple addresses then its an array? If that is true, then can use the EvaluateJsonPath processor to get the size of child elements of the "addresses" key with the following json path expression: $.addresses.length() If you have one address then the result is 1 otherwise >1. Then you can use RouteOnAttribute when the length is 1 to Jolt Transformation processor with the following spec to convert to Array: [
{
"operation": "shift",
"spec": {
"addresses": {
"*": "addresses.[].&"
},
"*": "&"
}
}
] If that helps please accept solution. Thanks
... View more
09-26-2022
07:23 AM
1 Kudo
Hi, You dont have to use the ExtractText processor for this. Use the EvaluateJsonPath processor with the following configuration: If you find this helpful please accept solution. Thanks
... View more
09-25-2022
06:58 AM
Hi, Have you looked into the ControlRate processor. Its not exactly doing what you want but it allows you to put a time to hold a flowfile before it gets released to the next processor. For example if you think that you need a second to process one flowfile from the moment its fetched to the moment its processed by PutKudu, then you can configure the ControlRate as follows:
... View more