Support Questions

Find answers, ask questions, and share your expertise

How to configure ExecuteSQL processor to run statements in a flow file in sequence

avatar
Contributor

I have a flowfiles that contains few impala statements and are executed through ExecuteSQL processor in Nifi. When i the flowfile has one statement, it goes fine but when there are multiple statements, nifi processor errors out with invalid syntax. An example of the flow file with multiple

statements is below. Is execute sql the right processor for my requirement?

 

Error.PNG

 

compute incremental stats raw_db.source_table (ingest_date=2022-12-13);
compute incremental stats raw_db.source_table (ingest_date=2023-01-09);
compute incremental stats raw_db.source_table (ingest_date=2023-01-10);
compute incremental stats raw_db.source_table (ingest_date=2023-01-13);
compute incremental stats raw_db.source_table (ingest_date=2023-01-14);
compute incremental stats raw_db.source_table (ingest_date=2023-01-18);
compute incremental stats raw_db.source_table (ingest_date=2023-01-19);
compute incremental stats raw_db.source_table (ingest_date=2023-01-20);
compute incremental stats raw_db.source_table (ingest_date=2023-01-22);
compute incremental stats raw_db.source_table (ingest_date=2023-01-23);
compute incremental stats raw_db.source_table (ingest_date=2023-05-09);
compute incremental stats raw_db.source_table (ingest_date=2023-01-11);
compute incremental stats raw_db.source_table (ingest_date=2023-01-12);
compute incremental stats raw_db.source_table (ingest_date=2023-01-15);
compute incremental stats raw_db.source_table (ingest_date=2023-01-16);
compute incremental stats raw_db.source_table (ingest_date=2023-01-17);
compute incremental stats raw_db.source_table (ingest_date=2023-01-24);
compute incremental stats raw_db.source_table (ingest_date=2023-01-25);
compute incremental stats raw_db.source_table (ingest_date=2023-01-26);
compute incremental stats raw_db.source_table (ingest_date=2023-05-11);
compute incremental stats raw_db.source_table (ingest_date=2023-05-12);
compute incremental stats raw_db.source_table (ingest_date=2023-05-15);
compute incremental stats raw_db.source_table (ingest_date=2023-05-16);

1 REPLY 1

avatar
Super Collaborator

You could use a SplitContent processor to create a FlowFile for each statement. For "Byte Sequence" hold Shift+Enter 

joseomjr_0-1686774595531.png