cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Audit Vertica tables in Spark!

sarvesh
Contributor III

I am trying to use Audit from Vertica in spark and getting correct table size from it, but the minimum size Audit function can find is bytes, but we are getting data in bits even smaller than bytes.

val size = f"select audit('table_name');"

1 REPLY 1

Hubert-Dudek
Esteemed Contributor III

Rather everything will be in bytes. Spak sql have built in methods to get table size but also in bytes:

spark.sql("ANALYZE TABLE df COMPUTE STATISTICS NOSCAN")

spark.sql("DESCRIBE EXTENDED df ").filter(col("col_name") === "Statistics").show(false)

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group