CREATE-CATALOG
Name
CREATE CATALOG
Description
This statement is used to create an external catalog
Syntax:
CREATE CATALOG [IF NOT EXISTS] catalog_name
[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
Create catalog hive
CREATE CATALOG hive PROPERTIES (
"type"="hms",
'hive.metastore.uris' = 'thrift://172.21.0.1:7004',
'dfs.nameservices'='service1',
'dfs.ha.namenodes. service1'='nn1,nn2',
'dfs.namenode.rpc-address.HDFS8000871.nn1'='172.21.0.2:4007',
'dfs.namenode.rpc-address.HDFS8000871.nn2'='172.21.0.3:4007',
'dfs.client.failover.proxy.provider.HDFS8000871'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider'
);
Create catalog es
Keywords
CREATE, CATALOG