Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 01-11-2018 02:54 PM - edited 08-18-2019 12:57 AM
I need to create checksums in my ETL process. Therefore I need to sum up a numeric column in my JDBC-connected table(s). Copying the data works fine so far, but I was not able to find the correct NiFi processor for this aggregation task.
How can I calculate the sum of a table column? Which processor to use (is there something similar for the SelectHiveQL processor, which works fine for the same aggregation task)? And how to compare these two results (from two different tables) to check if the sums are equal?
I already tried to use a ExecuteSQL processor but there I get an SchemaParseException:
I'm using NiFi 1.4.0 and Hive 1.2.1.
Created 01-11-2018 04:26 PM
Can you create alias name for the aggregate column sum(menge) as menge then the processor will work.
Change the SQL Query as
Select sum(menge)menge from <table>
Created 01-11-2018 04:26 PM
Can you create alias name for the aggregate column sum(menge) as menge then the processor will work.
Change the SQL Query as
Select sum(menge)menge from <table>
Created 01-12-2018 10:54 AM
Yes, that was the solution! Thank you very much!
Everything works fine with the following statement now:
SELECT SUM(menge) menge FROM mytable