Skip to main content

oh catalog

Manage external metastore catalogs that tables are registered in.

Catalog types: GLUE GLUE_ICEBERG_REST_CATALOG HIVE BIGQUERY DATAHUB ONETABLE DATAPROC UNITY SNOWFLAKE ONELAKE


oh catalog show

Lists all catalogs.

oh catalog show

oh catalog describe NAME

Describes a catalog.

oh catalog describe glue-catalog

oh catalog create NAME

Creates a catalog.

Flags

FlagRequiredDescription
--typeYesCatalog type
--credential-typeNoCREDENTIAL_TYPE_ONEHOUSE (default) or CREDENTIAL_TYPE_SECRET_MANAGER. Applicable for DataHub only.
--options KEY=VALUENoWITH clause parameters; repeatable (see Special parameters)

Special parameters

All WITH clause parameters from the CREATE CATALOG API are passed via --options KEY=VALUE.

Examples

AWS Glue

oh catalog create my-glue-catalog \
--type GLUE \
--options glue.region=us-east-1

AWS Glue Iceberg REST Catalog

oh catalog create my-glue-irc \
--type GLUE_ICEBERG_REST_CATALOG \
--options glue.iceberg.rest.catalog.name=my_glue_catalog \
--options glue.iceberg.rest.aws.account.id=123456789012 \
--options glue.iceberg.rest.aws.region=us-west-2

Hive / DataProc Metastore

oh catalog create my-hive-catalog \
--type HIVE \
--options hive.catalog.servers=server1,server2

BigQuery

oh catalog create my-bq-catalog \
--type BIGQUERY \
--options bq.project.id=my-gcp-project \
--options bq.require.partition.filter=true \
--options bq.big.lake.connection.enabled=false

DataHub

oh catalog create my-datahub \
--type DATAHUB \
--options datahub.server.url=http://datahub.example.com \
--options datahub.data.platform.name=hudi \
--options datahub.dataset.environment=PROD \
--options datahub.auth.token=MY_TOKEN

DataHub with Secrets Manager

oh catalog create my-datahub \
--type DATAHUB \
--credential-type CREDENTIAL_TYPE_SECRET_MANAGER \
--options datahub.server.url=http://datahub.example.com \
--options datahub.data.platform.name=hudi \
--options datahub.dataset.environment=PROD \
--options datahub.auth.token.reference=arn:aws:secretsmanager:us-east-1:123456789012:secret:datahub-token

OneTable

oh catalog create my-onetable \
--type ONETABLE \
--options onetable.target.formats=iceberg,delta

Unity Catalog

oh catalog create my-unity \
--type UNITY \
--options unity.databricks.host=https://my.cloud.databricks.com \
--options unity.http.path=sql/1.0/warehouse/abc123 \
--options unity.auth.token=MY_PAT \
--options unity.catalog.name=my_catalog

Snowflake

oh catalog create my-snowflake \
--type SNOWFLAKE \
--options snowflake.account.identifier=my-account \
--options snowflake.warehouse=my_wh \
--options snowflake.database=my_db \
--options snowflake.external.volume=my_vol \
--options snowflake.catalog.integration=my_integration \
--options snowflake.auth.token.reference=arn:aws:secretsmanager:us-east-1:123456789012:secret:snowflake-token \
--options snowflake.role=my_role

OneLake (Microsoft Fabric)

oh catalog create my-onelake \
--type ONELAKE \
--options onelake.workspace.id=workspace-uuid \
--options onelake.item.id=item-uuid \
--options onelake.tenant.id=tenant-uuid \
--options onelake.client.id=client-uuid \
--options onelake.client.secret=MY_SECRET \
--options onelake.item.type=lakehouse

oh catalog delete NAME

Deletes a catalog.

oh catalog delete my-glue-catalog