Analyze Table

In this section, you will find information about Hive's Analyze Table statement and their Snowflake equivalent.

Description

The ANALYZE TABLE command is used to gather statistics and write them into Hive MetaStore. For more information check Hive Documentation.

Analyze Table command is not supported in Snowflake.

Grammar Syntax

In Hive, the Analyze Table syntax is:

ANALYZE TABLE [db_name.]tablename 
[
  PARTITION (partcol1[=val1] [, partcol2[=val2], ...])
]
COMPUTE STATISTICS 
[FOR COLUMNS]
[CACHE METADATA]
[NOSCAN]

Sample Source Patterns

Hive

ANALYZE TABLE table1 COMPUTE STATISTICS;

Snowflake

-- ** MSC-ERROR - MSCEWI1021 - ANALYZE TABLE NOT SUPPORTED **
--ANALYZE TABLE table1 COMPUTE STATISTICS;

Known Issues

No issues were found.

  1. MSCEWI1021: NODE NOT SUPPORTED

Last updated