Reputation: 19453
I'm using Amazon EMR service to manage some big-data hive tables.
I want to know the number of items in a table from my code.
Currently I'm running a query, something like:
select count(*) from myTable;
Saving the results into a file on S3 from the EMR and then read this file from the code from S3 to get the results.
Is there a direct way to get the output of a query using the Java SDK without the need to go through S3?
Upvotes: 1
Views: 172
Reputation: 19453
I solve it by integrating with org.apache.hive:hive-jdbc
.
Thanks to @ChristopherB advice.
Upvotes: 0