cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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)

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.