nrg4878 opened a new pull request #1680:
URL: https://github.com/apache/hive/pull/1680
### What changes were proposed in this pull request?
1) Adding support for data connectors in HiveQL. Added DDL support for
create, drop, alter, describe, show operations.
CREATE CONNECTOR <name> type 'mysql' URL 'jdbcURL' COMMENT 'comment' WITH
DCPROPERTIES(...);
2) Adding a type to the Hive Databases
CREATE DATABASE <name> --> creates a NATIVE database
CREATE REMOTE DATABASE <name> --> creates a REMOTE database that maps to a
database in another datasource.
example: a database in a RDBMS
3) Added DDL support for REMOTE databases (create, drop, describe, alter)
Beeline displays slightly different content for NATIVE databases vs REMOTE
databases.
4) Provided partial implementations for MySQL and Postgres (getTables spec
yet to be implemented, just getTable and getTableNames implemented)
Pending changes:
These changes are for initial review. The changes are incomplete
1) Schema changes only has DERBY support. Schema changes for other DBs yet
to come.
2) Unit tests
3) qtests
4) getTables() implementation
5) Support for DERBY/MSSQL/ORACLE data connectors.
6) Currently HS2 converts all table names to lower case. So if remote
datasources support cases sensitivity with table names, running queries will
not work as HMS will not be able to find remote table metadata. This is yet to
be addressed.
7) User facing documentation.
### Why are the changes needed?
These changes enable hive to be able to run queries against remote
datasources whose metadata does not reside in HMS. Its give hive the ability to
map many tables at once without having to define each of them individually.
### Does this PR introduce _any_ user-facing change?
Yes, this introduces user facing changes but should be backward compatible.
New Grammer changes:
create connector ... -> creates a connector metadata in hive. This is where
all the connection related properties are, like credentials and URLs etc.
drop connector --> drops the connector metadata
describe connector [extended] --> describes an existing connector
show connectors --> displays all connectors
alter connector --> alters existing metadata for a connector
Change to existing grammer:
create REMOTE database <dbname> USING <connector_name> WITH DBPROPERTIES.
creates a remote database using a data connector.
### How was this patch tested?
Manually with MySQL and POSTGRES databases.
Pending Unit and qtests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]