CREATE CATALOG | Databricks on AWS (original) (raw)

Applies to: Databricks SQL Databricks Runtime 10.4 LTS and above Unity Catalog only

Creates a catalog with the specified name. If a catalog with the same name already exists, an exception is thrown.

When you create a FOREIGN catalog it will be populated with all the schemas and their tables visible to the authenticating user.

CREATE CATALOG [ IF NOT EXISTS ] catalog_name
    [ USING SHARE provider_name . share_name |
      MANAGED LOCATION location_path |
      RETAIN DROPPED FOR number { HOUR | HOURS | DAY | DAYS | WEEK | WEEKS } |
      COMMENT comment |
      DEFAULT COLLATION default_collation_name |
      OPTIONS ( { option_name = option_value } [ , ... ] ) ] [...]

CREATE FOREIGN CATALOG [ IF NOT EXISTS ] catalog_name
    USING CONNECTION connection_name
    [ COMMENT comment ]
    OPTIONS ( { option_name = option_value } [ , ... ] )