Member since
11-16-2015
892
Posts
649
Kudos Received
245
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5206 | 02-22-2024 12:38 PM | |
1337 | 02-02-2023 07:07 AM | |
3004 | 12-07-2021 09:19 AM | |
4155 | 03-20-2020 12:34 PM | |
13949 | 01-27-2020 07:57 AM |
10-03-2023
03:35 PM
@mburgess I am trying to run a merge query in PUTSQL after using ExecuteSQL to pull from source database. I then pass the results through ConvertAvrotoJSON and then to convertJSONToSQL (set to INSERT since there is no UPSERT for SQL server database). I want to now run the merge query to update if the primary key is matched or insert if not, but I have been getting all sorts of errors Input flowfile has the following attributes sql.args.1.type 12 sql.args.1.value A-001 sql.args.2.type 12 sql.args.2.value DDD sql.args.3.type 12 sql.args.3.value 2B sql.args.4.type 12 sql.args.4.value AAA sql.args.5.type 12 sql.args.5.value 2B sql.args.6.type 12 sql.args.6.value BBB sql.args.7.type 93 sql.args.7.value 1954-08-01 22:46:50.73 sql.catalog CUSDB sql.table CUSTOMERS uuid 50a3daf9-e5d8-422b-b6cb-9c92da723c55 I created the following attributes in UpdateAtributes I directed this flowfile to UpdateAttribute where I created above properties like this sql.args.1.type = 12; sql.args.1.value = ${vkey} sql.args.2.type = 12; sql.args.2.value = ${AP} sql.args.3.type = 12; sql.args.3.value = ${BP} ........ sql.args.7.type = 93; sql.args.7.value = ${LAST_MOD_DATE} But when I check the results of the queue of the UpdateAtributes, I see that sql.args.1.type, sql.args.2.type, ... sql.args.7.type return blank values. I am doing something wrong in the way I have defined those properties? Merge query in PutSQL looks like this MERGE INTO RCDB.dbo.RCDB_WELLHEADER_HZ_NIFI_V2 as t USING (select ? as vkey, ? as ap, ? as bp, ? as lm, ? as lnum, ? as wn, ? as LAST_MOD_DATE) s ON t.EKEY = s.EKEY WHEN MATCHED THEN UPDATE SET t.ap = s.ap, t.bp = s.bp, t.lm = s.lm, t.lnum = s.lnum, t.wn = s.wn, t.LAST_MOD_DATE = s.LAST_MOD_DATE WHEN NOT MATCHED THEN INSERT (vkey, ap, bp, lm, lnum, wn, LAST_MOD_DATE) VALUES (?, ?, ?, ?, ?, ?, to_date(?, 'YYYY-MM-DD HH34:MI:SS')) I get the error that all parameters are blank. Can someone please point me in the direction to resolve this issue. Why are the attributes going blank when I set them in UpdateAttributes?
... View more
09-25-2023
02:42 PM
@Abhiram-4455 As this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post. Thanks.
... View more
09-13-2023
06:19 AM
I dont think you can use PutSQL for this. Try ExecuteSQL or you might have to use ExecuteScript processor as other posts suggest: https://community.cloudera.com/t5/Support-Questions/Does-ExecuteSQL-processor-allow-to-execute-stored-procedure/m-p/158922 https://stackoverflow.com/questions/72348844/get-output-of-stored-procedure-using-putsql-in-nifi If that helps please accept solution. Thanks
... View more
07-27-2023
07:42 AM
is this solution is fit in streaming more than puthive3ql for about 10 GB during the day???
... View more
06-29-2023
11:47 AM
https://medium.com/@tspann/ingesting-events-into-dockerized-ibm-db2-jdbc-with-apache-nifi-f0ca452d1351 It works fine with QueryDatabaseTableRecord and PutDatabaseRecord
... View more
06-13-2023
02:59 PM
1 Kudo
Tracking here: https://issues.apache.org/jira/browse/NIFI-11682
... View more
05-30-2023
06:13 AM
https://dev.to/tspannhw/simple-change-data-capture-cdc-with-sql-selects-via-apache-nifi-flank-19m4 You can use the metadata database processors to list all tables in a database and then read all values from tables
... View more
05-29-2023
11:42 AM
@NaBeeL_NaQeeBi Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.
... View more
05-25-2023
12:59 AM
everybody is entitled to an opinion but may I ask why are you saying this? 🙂 As you are on a NiFi post, I assume that you are referring to the Cloudera NiFi documentation? I find it very helpful, especially combined with the NiFi's original documentation. It even has some additional thins compared to the original documentation. No matter the feedback, positive or negative, it is good when you know what to do with it. In your case, if you would provide a better and more structured feedback, maybe somebody from Cloudera would understand your point of view and he/she could modify the documentation 🙂
... View more
03-22-2023
03:54 AM
@mburgess @SamCloud convert jsontosql is giving SQL but with '?' marks. example: "DELETE FROM tab1 WHERE id = ? AND feature_name = ? AND state = ? AND tenant_id = ?" When i print via putfile, the json has valid values.. [{"id":1,"feature_name":"fet1","state":16,"tenant_id":"abc123"}] Want to understand where I am doing it wrong.. Please help
... View more