Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a connector first.
        CREATE CONNECTOR hiveserver_connector TYPE 'hivejdbc' URL 'jdbc:hive2://<maskedhost>:10000' 
    WITH DCPROPERTIES ("hive.sql.dbcp.username"="hive", "hive.sql.dbcp.password"="hive");

  2. Create a database of type REMOTE in hive using the connector from Step1Step 1.    This This maps a remote database named "default" to a hive database named "hiveserver_remote" in hive.
         CREATE REMOTE DATABASE hiveserver_remote USING hiveserver_connector 
WITH DBPROPERTIES ("connector.remoteDbName"="default");

3. Use the tables in REMOTE database much like the JDBC-storagehandler based tables in hive. One big difference is that the metadata for these
tables are never persisted in hive. Currently, create/alter/drop table DDLs are not supported in REMOTE databases.

        0: jdbc:hive2://localhost:10000> USE hiveserver_remote;

...