CREATE-CATALOG

Name

CREATE CATALOG

Description

This statement is used to create an external catalog

Syntax:

  1. CREATE CATALOG [IF NOT EXISTS] catalog_name
  2. [PROPERTIES ("key"="value", ...)];

PROPERTIES is the connection information for the catalog. The “type” attribute must be specified, currently supports:

  • hms:Hive MetaStore
  • es:Elasticsearch

Example

  1. Create catalog hive

    1. CREATE CATALOG hive PROPERTIES (
    2. "type"="hms",
    3. 'hive.metastore.uris' = 'thrift://172.21.0.1:7004',
    4. 'dfs.nameservices'='service1',
    5. 'dfs.ha.namenodes. service1'='nn1,nn2',
    6. 'dfs.namenode.rpc-address.HDFS8000871.nn1'='172.21.0.2:4007',
    7. 'dfs.namenode.rpc-address.HDFS8000871.nn2'='172.21.0.3:4007',
    8. 'dfs.client.failover.proxy.provider.HDFS8000871'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider'
    9. );
  2. Create catalog es

Keywords

CREATE, CATALOG

Best Practice