Member since
08-23-2022
16
Posts
0
Kudos Received
0
Solutions
03-07-2023
08:28 AM
Hi , I have a requirement where I need to pass the AWS Signature authorization type to fetch the data from an api. Pls help me how to built it. Thanks
... View more
Labels:
- Labels:
-
Apache NiFi
03-04-2023
09:24 AM
Hi, Please try the following jolt spec: [
{
"operation": "shift",
"spec": {
"rows": {
"*": {
"f": {
"0": {
"v": "[#4].export_time"
},
"1": {
"v": "[#4].account_id"
},
"2": {
"v": "[#4].cost"
}
}
}
}
}
}
] If that helps please accept solution. Thanks
... View more
02-11-2023
10:54 AM
Hi Team, pls help me out wit this jolt specification. pls help me Note : 1.Resourcename is lastelement of resourceid ...which is new varaiable we need to add to expected out 2.Tags field needs to be copied and splited as mentioned in expected output. Input: [ { "ResourceId": "/subscriptions/bb842437aa4/resourceGroups/ECHLABHENKEL/providers/Microsoft.Compute/virtualMachines/pmoapps", "Tags": "Name\": \"PMOapplication\",\"Owner\": \"Breil sathish" }, { "ResourceId": "/subscriptions/bb842437aa4/resourceGroups/HCLTECHLABHENKEL/providers/Microsoft.Compute/virtualMachines/pmoapps", "Tags": "Name\": \"PMOapplication\",\"Owner\": \"Breil sathish1" } ] Expected Output: [ { "ResourceId": "/subscriptions/bb842437aa4/resourceGroups/ECHLABHENKEL/providers/Microsoft.Compute/virtualMachines/pmoapps", "Tags": "Name\": \"PMOapplication\",\"Owner\": \"Breil sathish", "Resourcename": "pmoapps", "Name": "PMOapplication", "Owner": "Breil sathish" }, { "ResourceId": "/subscriptions/bb842437aa4/resourceGroups/HCTlembvs/providers/Microsoft.Compute/virtualMachines/pmoapps", "Tags": "Name\": \"PMOapplication\",\"Owner\": \"Breil sathish1", "Resourcename": "pmoapps", "Name": "PMOapplication", "Owner": "Breil sathish1" } ] Thanks
... View more
Labels:
- Labels:
-
Apache NiFi
12-13-2022
07:07 AM
@sathish3389 Routing based on a sensitive value is an unusual use case. I'd love to hear more about this use case. Ultimately the RouteOnAttribute processor expects a boolean NiFi Expression Language Statement. So you want to have a sensitive parameter value that is evaluated against something else (another attribute on the inbound FlowFile) and if true route to a new relationship. Is what you are comparing this sensitive parameter value against also sensitive? If so, how are you protecting it as Attributes on FlowFiles are not sensitive and stored in plaintext. The ability to use Sensitive Parameters in dynamic properties (non password specific component properties) was added via https://issues.apache.org/jira/browse/NIFI-9957 in Apache NiFi 1.17.0. While this change created the foundation for such dynamic Property support for sensitive parameters, individual components need to be updated to utilize this new capability. As you can imagine with well over 300+ components available to NiFi, this is a huge undertaking. So what i see in the apache community are changes based on specific use case requests. I'd recommend creating an Apache NiFi Jira detailing your use case and working with the Apache Community to adopt that use case change to the RouteOnAttribute processor to support dynamic property support for Sensitive parameters. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
10-28-2022
05:44 AM
1 Kudo
@sathish3389 Define a parameter context and parameter ("parameter_password") for your flow with your password string, define that as sensitive value, then use the parameter in the processor property value : ${http.headers.Authorization:equals(#{parameter_password}) This will hide the password and make it easy to update the password by just updating the parameter.
... View more
10-13-2022
08:05 AM
@sathish3389 Its not entirely clear what you are asking here but I will give it a go. ListenHttp is used to listen to an http port with POST limited capabilities. If you are looking post data to nifi as more of REST API, you may want to check out HandleHttpRequest and HandleHttpResponse, as they have a bit more capability, and some ssl client authentication requirements. They also allow you to program authentication logic before returning the response. T o do that. you would build your data flow (after HandleHttpRequest) to look for an authentication (user,password,key,etc) header, validate that and then if valid, continue to HandleHttpResponse with 200 (success). An invalidate authentication header would then go to HandleHttpResponse with 500 (error). An invalid request (wrong path, missing info, etc) could be routed to HandleHttpReponse with 404 (invalid).
... 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
09-29-2022
08:02 AM
1 Kudo
Are you asking how to import the template into Nifi, or how to drop a template you've already loaded onto the canvas? It is two distinct actions.
... View more
09-20-2022
10:21 AM
Hi, Please try the following spec: [
{
"operation": "shift",
"spec": {
"timestamp": {
"*": {
"@(2,resourceid)": "[&1].resourceid",
"@": "[&1].timestamp"
}
},
"Key": {
"*": {
"@": "[&1].key"
}
},
"data": {
"*": {
"@": "[&1].data"
}
}
}
}
] If you find this helpful, please accept solution. Thanks
... View more
09-12-2022
08:49 AM
Hi, To help you I think we need to understand your question better, so you have a json input like you specified above, from what I understand there are two parts you are trying to solve: 1- You need to process this json if it meets certain condition, in this case the condition is if the Json attribute "dataSourceName" is equal to "Standard CPU Utilization Network Cisco". 2- If the json meets the condition above then you want to apply Json Jolt Transformation to produce the output you specified, is this correct? To answer the first part, I'm not sure if you can have conditional json jolt so you can do the first and the second part in one processor. I think what you need to do is use EvaluateJsonPath processor to extract the value that you need -dataSourceName- into a flow file attribute then use RouteOnAttribute to check the value so that if meets the condition (="Standard CPU Utilization Network Cisco" ) the match relationship will direct the flow file to the Jolt transformation processor to apply needed transformation , otherwise the flowfile will be dropped or direct to unmatched relationship for farther processing. For the second part, its not clear if you need the exact output you specified no matter what the other values in the input json are , which in this case you can use the ReplaceText processor just to replace the whole input json with the expected out, Or you actually need json jolt transformation to capture different values for each json input which in this case its not clear how you are selecting your values, for example on what basis you decided that the value of "Datapoints" is "MemoryFree", also how the attribute "Datas" has the value of "Values[3]". So you need to clarify that better so we can help you with creating the proper jolt spec. Hope that helps. Thanks
... View more
09-08-2022
11:45 PM
Hi , I am working on jolt transforms processor, my input is: { "dataSourceName": "Standard CPU Utilization Network Cisco", "dataPoints": [ "CPU1min", "CPU5min", "MemoryFree", "MemoryUsed", "MemoryTotal" ], "instances": { "Standard CPU Utilization Network Cisco-NPE400 0 Index9": { "values": [ [ "No Data", "No Data", "No Data", "No Data", "No Data" ], [ "No Data", "No Data", "No Data", "No Data", "No Data" ], [ "No Data", "No Data", "No Data", "No Data", "No Data" ], [ "No Data", "No Data", "No Data", "No Data", "No Data" ], [ "No Data", "No Data", "No Data", "No Data", "No Data" ], [ "No Data", "No Data", "No Data", "No Data", "No Data" ], "time": [ 1662618899000, 1662618839000, 1662618779000, 1662618719000, 1662618659000, 1662618599000, 1662618539000, 1662615570000, 1662615510000, 1662615450000, 1662615390000 ] } } } Condition: The requirement is we need to use if else statement like if [datasourcename] == Standard CPU Utilization Network Cisco then Expected output: { “Datasourcename” : “Standard CPU Utilization Network Cisco”, “Datapoints” : "MemoryFree", “Parametername” : “Standard CPU Utilization Network Cisco-NPE400 0 Index9” “Datas”: values[3], } How can I achieve using jolt transforms processor, Pls help me out.
... View more
Labels:
- Labels:
-
Apache NiFi
08-26-2022
11:52 PM
Thanks for your help @SAMSAL
... View more