Member since
12-10-2019
9
Posts
3
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
4167 | 02-25-2020 05:26 AM | |
11514 | 12-11-2019 04:25 AM |
03-16-2020
08:44 AM
1 Kudo
Hi All,
I am trying to generate separate UUID for JSON array of objects. I tried to use ${UUID()} in JOLT specification, but this is generating same UUID for all the elements.
e.g.
Input:
===============
{ "aliases": [ "Alias1", " Alias2" ] }
JOLT Specification
=====================
[ { "operation": "shift", "spec": { "aliases": { "*": "alias[&0].name" } } }, { "operation": "modify-default-beta", "spec": { "alias": { "*": { "id": "${UUID()}" } } } } ] Current Output:
=====================
"alias" : [ { "name" : "Alias1", "id" : "2948446b-6213-44ba-b81f-c4e5f7dab2eb" }, { "name" : " Alias2", "id" : "2948446b-6213-44ba-b81f-c4e5f7dab2eb" } ]
Any pointers will be greatly appreciated.
Thanks,
Biswa
... View more
Labels:
- Labels:
-
Apache NiFi
03-16-2020
05:17 AM
Hi All,
I am trying to generate separate UUID for JSON array of objects. I tried to use ${UUID()} in JOLT specification, but this is generating same UUID for all the elements.
e.g.
Input:
===============
{ "aliases": [ "Alias1", " Alias2" ] }
JOLT Specification
=====================
[ { "operation": "shift", "spec": { "aliases": { "*": "alias[&0].name" } } }, { "operation": "modify-default-beta", "spec": { "alias": { "*": { "id": "${UUID()}" } } } } ] Current Output:
=====================
"alias" : [ { "name" : "Alias1", "id" : "2948446b-6213-44ba-b81f-c4e5f7dab2eb" }, { "name" : " Alias2", "id" : "2948446b-6213-44ba-b81f-c4e5f7dab2eb" } ]
Any pointers will be greatly appreciated.
Thanks,
Biswa
... View more
Labels:
- Labels:
-
Apache Hadoop
02-25-2020
05:26 AM
I found out the solution. It may be helpful for someone. If anyone has better spec, please let me know [ { "operation": "shift", "spec": { "*": { "urlTypeId": { "1": { "@2": "domoDashboardLink" } } } } }, { "operation": "shift", "spec": { "domoDashboardLink": { "examUrl": "&1" } } } ]
... View more
02-19-2020
12:56 AM
I want to populate my target JSON with a field based on value of another field.
e.g.
Input JSON: [
{ "examUrl": "https://exam.test.com/page/1473161074", "urlTypeName": "Spring URL" },
{ "examUrl": "https://exam.test.com/page/12423222", "urlTypeName": "Java URL" },
]
Expected Output:
{
"ExamDashBoardURL" : "https://exam.test.com/page/1473161074"
}
In the above example, I will populate ExamDashBoardURL only if urlTypeName is "Spring URL".
Can anyone please help me on this.
Thanks and Regards,
Biswa
... View more
Labels:
- Labels:
-
Apache NiFi
12-12-2019
10:18 PM
Hi,
I am extracting image width and image height using ExtractImageMetadata processor and comparing the Image Width and Image Height with threshold value. If it is greater than the threshold value than I will resize the image. Attribute names, Image Width and Image Height is different for different image formats.
e.g. For .png
PNG-IHDR.Image Height PNG-IHDR.Image Width
For .jpg
JPEG.Image Height
JPEG.Image Width
I want to have a regular expression something like below. So that irrespective of image format, I will be able to compare the Image Width and Image Height.
${"*Image Width":ge(1000):and(${"*Image Height":ge(1000)})}
Above regular expression is not working as expected. Any input will be helpful.
Thanks and Regards,
Biswa
... View more
Labels:
- Labels:
-
Apache NiFi
12-11-2019
04:25 AM
2 Kudos
May be it will be useful for someone. I used searchValue as "\p{C}" and ReplaceValue as empty String \p{C} finds all non-printable characters.
... View more
12-11-2019
01:05 AM
@MattWho It is not newline, its CTRL M (^M) characters. I am able to see the ^M characters in vi editor.
... View more
12-10-2019
10:14 PM
Thanks Matt for you response. Below is the sample input and desired output Sample Input: sdfasdjfsjdbfuk3ewqe qweqiwqwdqw372ie= Desired output sdfasdjfsjdbfuk3ewqeqweqiwqwdqw372ie=
... View more
12-10-2019
05:34 AM
Hi, I am trying to remove all new lines from base64encoded string using replaceText processor. Properties for replaceText processor is as follows: Search Value : \\n Replacement Value:$1 Character Set: UTF-8 Maximum Buffer Size: 10MB Replacement Strategy: Regex Replace Evaluation Mode: Line-by-Line But this not working.
... View more
Labels:
- Labels:
-
Apache NiFi