Count number of records before and after flowfile and dynamic attribute usage
Hello,
Could someone please help me with this case
I want to copy data from an Oracle table to another table that has the same schema. I want to count number of record read in and number of records succesfully inserted to the target, and put those counts into a tracking table. My idea is as below

In which, the left branch I count the records in, the right branch I insert data to target table and then count records.
-QueryRecord: count number of record. Output from left and right branch are the same and as below


-ExtractText: to extract just the count to record_in and record_out. The output attribute is as below


-MergeContent: Merge these 2 attributes before put SQL. Result and output attributes are as below



-UpdateAttribute: to escape user-based input

My query is something like:
INSERT INTO TABLE_1 (TABLE_NAME, RECORD_IN, RECORD_OUT) VALUES ('manually_input', ?, ?)
I got the error: ORA-00911: invalid character SQL = INSERT INTO TABLE_1 (TABLE_NAME, RECORD_IN, RECORD_OUT) VALUES ('manually_input', :1, :2)
How could I fix this error? Also is this a proper approach or would you suggest another way to perform this task? Thank you so much






