Code scala

Find Number of Rows of Hive Table via Scala

Kontext Kontext visibility 314 comment 0 access_time 2 years ago language English

descriptionCode description

Find Number of Rows of Hive Table via Scala
To find the number of rows/records in a Hive table, we can use Spark SQL count aggregation function: Hive SQL - Aggregate Functions Overview with Examples.

This code snippet provide example of Scala code to implement the same. spark-shell is used directly for simplicity.  The code snippet can also run Jupyter Notebooks or Zeppelin with Spark kernel. Alternatively, it can be compiled to jar file and then submit as job via spark-submit


copyright This page is subject to Site terms.
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts