3

I'm trying to compute statistics on a delta table in SQL from Databricks.

I do :

ANALYZE TABLE '/my_dir/my_table' COMPUTE STATISTICS

and I get an error message :

Error in SQL statement: ParseException: no viable alternative at input 'ANALYZE TABLE '/my_dir/my_table''

But if I do for example :

DESCRIBE DETAIL '/my_dir/my_table'

then it works fine.

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
TOMC
  • 123
  • 10

1 Answers1

1

The documentation wasn't really correct - this command requires table to be registered in Hive Metastore/Unity Catalog to work. It doesn't work with paths right now.

Alex Ott
  • 80,552
  • 8
  • 87
  • 132