Member since
03-29-2023
52
Posts
32
Kudos Received
3
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1085 | 04-05-2024 12:26 PM | |
1379 | 03-05-2024 10:53 AM | |
10434 | 04-03-2023 12:57 AM |
04-04-2024
04:04 AM
3 Kudos
Hi @enam, 1. Please set the Create Directory to false to avoid the folder creation. 2. you can change the filename using UpdateAttribute processor by following below steps: 2.1: let say your file name is "97435cb8-b8b1-4b4d-b60b-f6aa98a15ba9" and UUID is "97435cb8-b8b1-4b4d-b60b-f6aa98a15ba9" 2.2. Now drag the UpdateAttribute name and writedown the below Expression Lang updated file name OR Output: "Accept as Solution" if its work for you.
... View more
04-04-2024
03:02 AM
1 Kudo
Hi @Nicanor, you can bring another JoltTransformJSON processor and write down the below JOLT spec to extract the element of list. JOLT Spec [
{
"operation": "shift",
"spec": {
"msgText": "&",
"phenomenonTime": "phenomenonTime",
"cloud_base": "cloud_base_List",
"cloud_amount": "cloud_amount_List"
}
},
// Extracting Values from the List
{
"operation": "modify-overwrite-beta",
"spec": {
// Extract the last element from each list
"cloud_base1": "=lastElement(@(1,cloud_base_List))",
"cloud_base2": "=firstElement(@(1,cloud_base_List))"
}
}
] JOLT Output {
"msgText" : "METAR RKSS 040000Z 09007KT 030V120 9999 SCT035 BKN150 15/05 \n Q1015 NOSIG=",
"phenomenonTime" : "2024-04-04T00:00:00Z",
"cloud_base_List" : [ 3500, 15000 ],
"cloud_amount_List" : [ "link data", "link data" ],
"cloud_base1" : 15000,
"cloud_base2" : 3500
} One more suggestion, please remove the unrequired line of code. you can typecast the data type by using UpdateRecord processor. Because JOLT transformation may consume large amounts of memory. [
{
"operation": "shift",
"spec": {
"response": {
"body": {
"items": {
"item": {
"*": {
"*": {
"extension": {
"msgText": "msgText"
},
"observation": {
"OM_Observation": {
"phenomenonTime": {
"TimeInstant": {
"timePosition": "phenomenonTime"
}
},
"featureOfInterest": {
"SF_SpatialSamplingFeature": {
"sampledFeature": {
"AirportHeliport": {
"timeSlice": {
"AirportHeliportTimeSlice": {
"name": "featureOfInterest"
}
}
}
},
"shape": {
"Point": {
"pos": "shape"
}
}
}
},
"result": {
"MeteorologicalAerodromeObservationRecord": {
"airTemperature": {
"\\$": "airTemperature"
},
"dewpointTemperature": {
"\\$": "dewpointTemperature"
},
"qnh": {
"\\$": "qnh"
},
"surfaceWind": {
"AerodromeSurfaceWind": {
"meanWindDirection": {
"\\$": "meanWindDirection"
},
"meanWindSpeed": {
"\\$": "meanWindSpeed"
},
"windGustSpeed": {
"\\$": "windGustSpeed"
},
"extremeClockwiseWindDirection": {
"\\$": "extremeClockwiseWindDirection"
},
"extremeCounterClockwiseWindDirection": {
"\\$": "extremeCounterClockwiseWindDirection"
}
}
},
"visibility": {
"AerodromeHorizontalVisibility": {
"prevailingVisibility": {
"\\$": "AerodromeHorizontalVisibility"
}
}
},
"presentWeather": {
"href": "presentWeather"
},
"cloud": {
"AerodromeObservedClouds": {
"layer": {
"*": {
"CloudLayer": {
"amount": {
"href": "cloud_amount"
},
"base": {
"\\$": "cloud_base"
},
"cloudType": {
"href": "cloudType_href",
"title": "cloudType"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
] "Accept as Solution" if its work for you.
... View more
04-04-2024
02:20 AM
4 Kudos
HI @Ytch, If your NiFi is clustered enviornment then make sure to run on "primary node only". Just cross check. For the hostname, you should provide the fully qualified hostname of the SFTP server. You don’t need to include the sftp:// prefix; simply provide the hostname (e.g., my-sftp-server.com). Ensure that this hostname is resolvable by the NiFi host
... View more
04-03-2024
12:46 PM
Can you send the JOLT just to understand what you are exactly extracting? for example if you are extracting @value then something like "@value": "=toInteger" in JOLT can be written for typeconversion. I belive type conversion can not be done in list.
... View more
04-03-2024
12:56 AM
Are you fetching and processing the records as it is ? or defining the json path (flatting the JSON) ? [{ "Name": "Gta V" "Type": "Xyz" "content": "{"Game":{"Subject":[{"Time":{"@value":"201511021057"}}]}}" }]
... View more
04-02-2024
07:56 AM
you can use Grafana to monitor the server, they already have predefined dashboard template. More details https://pierrevillard.com/2017/05/16/monitoring-nifi-ambari-grafana/ https://grafana.com/grafana/dashboards/11387-nifi-monitoring/
... View more
04-02-2024
07:48 AM
HI @mstfo, Take the output to UpdateRecord processor, and cast the desire field to any specific data type example formula: ${field.value:ToInteger()}
... View more
04-02-2024
07:43 AM
Hi @Meriem, check if your columns name are excatly same as it defined in csv file.
... View more
04-01-2024
07:46 PM
1 Kudo
HI @sajidkhan, I have tried below and seems records are getting successfully converted to csv. option 1: As samsal suggest we can use the ConvertRecord to convert to specific file format. option2: just try using the updaterecord processor and add some dummy calculation on it. Output
... View more