Member since
02-08-2022
7
Posts
5
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1128 | 02-10-2022 07:06 AM |
04-04-2024
04:31 AM
4 Kudos
"This is the output I obtained with executesqlrecord: [{ "Name": "Gta V" "Type": "Xyz" "content": "{"Game":{"Subject":[{"Time":{"@value":"201511021057" }}]}}" }] After executesqlrecord, I use ${'$1':unescapeJson()} in the replacetext processor to remove the backslash characters. Then my output looks like this: [{ "Name": "Gta V" "Type": "Xyz" "content": "{"Game":{"Subject":[{"Time":{"@value":"201511021057" }}]}}" }] What I want is, after removing the backslashes, the nested JSON data in the content field should not come within double quotes. I want to learn the ways to remove it after ReplaceText. So, ultimately, the desired output is: [{ "Name": "Gta V" "Type": "Xyz" "content": {"Game":{"Subject":[{"Time":{"@value":"201511021057"}}]}} }]
... View more
04-03-2024
01:45 AM
The content field in the source table is in string format. When I receive the data from the source, it comes like this: [{ "Name": "Gta V" "Type": "Xyz" "content": "{"Game":{"Subject":[{"Time":{"@value":"201511021057" }}]}}" }] After I fetch this data with NiFi, I need to use a Jolt transformation on the content field, but since the content field is in string format, I can't perform the transformation. My actual problem is to eliminate the string expression in the content field and convert it to the following format so that I can use Jolt for the content field: [{ "Name": "Gta V" "Type": "Xyz" "content": {"Game":{"Subject":[{"Time":{"@value":"201511021057"}}]}} }]
... View more
04-02-2024
11:50 PM
I am currently using the 'executesqlrecord -> replacetext' (for unescapeJson) process. How should I use the 'updateRecord' processor here? Could you explain a bit more ?
... View more
04-02-2024
01:25 AM
1 Kudo
Hello, I have a JSON data in the ClickHouse database with a type of string. The JSON data looks like this: [{ "Name": "Gta V" "Type": "Xyz" "content": "{"Game":{"Subject":[{"Time":{"@value":"201511021057"}}]}}" }] The output I get using Nifida ExecuteSqlRecord is like this. I can remove the \ character using the ReplaceText process. The output looks like this: [{ "Name": "Gta V" "Type": "Xyz" "content": "{"Game":{"Subject":[{"Time":{"@value":"201511021057"}}]}}" }] However, the value part for the content key is still a string. How can I make its type as JSON? The desired output is like this: [{ "Name": "Gta V" "Type": "Xyz" "content": {"Game":{"Subject":[{"Time":{"@value":"201511021057"}}]}} }]
... View more
Labels:
- Labels:
-
Apache NiFi
02-10-2022
07:06 AM
I used MergeContent and i solved my problem. Thanks !
... View more
02-08-2022
05:13 AM
I'm using ExecuteSQL,SplitAvro,ConvertAvroToJSON,EvaluateJsonPath,ReplaceText,ExecuteSQL. I am trying to replace the content in the flowfile using replaceText processor. Now, i can replace like this. -> INSERT INTO values (${id},'${name}') . ReplaceText process like this : INSERT into x values(1,'xx') INSERT into x values(2,'yy') INSERT into x values(3,'zz') I'm sending INSERT query for each line. But i want to send executesql process like this INSERT INTO x values (1,'xx'),(2,'yy'),(3,'zz')
... View more
Labels:
- Labels:
-
Apache NiFi