Skip to content

Unity Catalog CLI

Unity Catalog CLI can be started using ./bin/uc command-line utility that runs UnityCatalogCli.

❯ ./bin/uc --help

Usage: bin/uc <entity> <operation> [options]
Entities: schema, volume, model_version, metastore, auth, catalog, function, permission, registered_model, user, table

By default, the client will connect to UC running locally at http://localhost:8080

To connect to specific UC server, use --server https://<host>:<port>

Currently, auth using bearer token is supported. Please specify the token via --auth_token <PAT Token>

For detailed help on entity specific operations, use bin/uc <entity> --help

Entities

Unity Catalog CLI supports the following entities (commands):

Options

output

The output format

Format Description
json Prints out the output directly (with no changes) for read and call subcommands when postProcessAndPrintOutput
jsonPretty Uses the default PrettyPrinter for the ObjectWriter to pretty-print JSONs

Fixed-Width Output Fields

As of this commit, the tabular output of Unity Catalog CLI always displays the entire values of the following columns (case-insensitive):

  • NAME
  • Any column with ID suffix (e.g., TABLE_ID)
$ ./bin/uc table list --catalog unity --schema default
┌─────────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────────────────────────────┐
│      NAME       │CATALOG_NAME│SCHEMA_NAME │ TABLE_TYPE │DATA_SOURCE_│  COLUMNS   │STORAGE_LOCA│  COMMENT   │ PROPERTIES │ CREATED_AT │ UPDATED_AT │              TABLE_ID              │
│                 │            │            │            │   FORMAT   │            │    TION    │            │            │            │            │                                    │
├─────────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────────────────────────────┤
│numbers          │unity       │default     │EXTERNAL    │DELTA       │[{"name":...│file:///U...│External ...│{"key1":"...│172042953...│172042953...│b5d6db68-5eca-485c-be5f-5f53d4f27f60│
├─────────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────────────────────────────┤
│marksheet_uniform│unity       │default     │EXTERNAL    │DELTA       │[{"name":...│file:///t...│Uniform t...│{"key1":"...│172042953...│172042953...│76874c28-0ebf-46e7-9971-eb164bd62c46│
├─────────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼────────────────────────────────────┤
│marksheet        │unity       │default     │MANAGED     │DELTA       │[{"name":...│file:///U...│Managed t...│{"key1":"...│172042953...│172042953...│25ca07aa-1350-4104-b485-13b9ad1f5d72│
└─────────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────────────────────────────┘

Read-Write Support for Delta Tables Only

Only delta tables are supported for read and write operations.