Member since
02-16-2023
5
Posts
0
Kudos Received
0
Solutions
03-13-2023
09:57 AM
Hi, People. I need to insert the json data which is listen by ListenHttp processor. As of now I am using ExtractText Processor to concat all the json key and value into one string and inserting to table and later doing parse json in snowflake table. But I want insert the Json string to table having two columns(ID, Column1), The issue i am facing is I am not able to insert the json string(concatenated) into a table have two columns. But I am able to insert to a table which has only one column(column1). But I want two columns in table with (ID, Column1) as it is easy to handle data. This is the INSERT statement i am using in putsql, INSERT INTO EMPLOYEE_SCHEMA.TEST4 (COLUMN1) values ('${JsonRecord}'), The is the flow i am using. Any suggestion will be appreciated .
... View more
Labels:
- Labels:
-
Apache NiFi
02-19-2023
10:34 PM
Hi SAM, Actually it worked for me now. No error now. Thank you for your help.
... View more
02-19-2023
09:45 PM
Hi SAM, Thank you for response. I am facing one more error, while inserting data into table. Even though i have tables named test4 in my snowflake table, The PUTSQL processor keep telling "The Table 'test4' doesn't exist or not Authorized(I did give permission too). This is my sql statement(INSERT INTO test4 (JSON_DATA) values ('${JsonRecord}'). Any help will be appreciated.
... View more
02-16-2023
08:26 PM
Hi, SAM. Thank you for response. I am using ListenHTTP to get json data-->ConvertRecord(to validate json) -->SplitJson(to split)-->Now I have individial Json Objects. Now I have concatenate all the keys and values of each json object and insert to a table have single column called JSON_DATA. This is my input data, [ {"Name":"Joh ","Age": 2,"Occupation":"Developer", "Location": "New York","Salary": 75780}, {"Name": "Ja","Age": 9,"Occupation": "Designer", "Location": "San Francisco","Salary": 87800}, {"Name": "Bb kkkk","Age": 5,"Occupation": "Manager", "Location": "London","Salary": 90870} ]...I want insert each json obj inot each new row as string like this in a snowflake table ' {"Name":"Joh ","Age": 2,"Occupation":"Developer", "Location": "New York","Salary": 75780} '
... View more
02-16-2023
08:32 AM
Please help design data flow in nifi, I need to insert the incoming JSON data into table which having single column. The condition are I need to concat all the keys and values and insert that data.
... View more
Labels:
- Labels:
-
Apache NiFi