analyzeTable

analyzeTable is a Change Type in the Liquibase Open Source Databricks extension that analyzes a table.

Note: Rollback is not supported for analyzeTable.

Uses

You can use analyzeTable to collect statistics about your table. This helps the Databricks query optimizer develop an optimal query plan. That way, it can improve query performance and speed up the operations you make on your tables.

Once you collect your statistics, you can use the Databricks DESCRIBE EXTENDED <tablename> SQL query to display them.

Run analyzeTable

To run this Change Type, follow these steps:

  1. Add the Change Type to your changeset, as shown in the examples on this page.

  2. Specify any required attributes. Use the table on this page to see which ones your database requires.

  3. Deploy your changeset by running the update command:liquibase update

Available attributes

Tip: You must specify all top-level attributes marked as required. If you specify an optional attribute, you must also specify any nested attributes that it requires.

Name

Type

Description

Requirement

tableName

String

Name of the table to analyze.

Required

analyzeColumns

String

Name of the column(s) to analyze. Separate multiple values using commas.

Optional

Note: The PARTITION SQL clause is not supported for the analyzeTable Change Type.

analyzeTable examples

databaseChangeLog:
  - changeSet:
      id: 2
      author: your.name
      changes:
        - analyzeTable:
            tableName: test_analyze_table
            analyzeColumns: col_1,col_2

analyzeTable - Liquibase