nrg4878 opened a new pull request #2037: URL: https://github.com/apache/hive/pull/2037
Adding support for data connectors in HiveQL. Added DDL support for create, drop, alter, describe, show operations. CREATE CONNECTOR type 'mysql' URL 'jdbcURL' COMMENT 'comment' WITH DCPROPERTIES(...); Adding a type to the Hive Databases CREATE DATABASE --> creates a NATIVE database CREATE REMOTE DATABASE --> creates a REMOTE database that maps to a database in another datasource. example: a database in a RDBMS Added DDL support for REMOTE databases (create, drop, describe, alter) Beeline displays slightly different content for NATIVE databases vs REMOTE databases. 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 Schema changes only has DERBY support. Schema changes for other DBs yet to come. Unit tests qtests getTables() implementation Support for DERBY/MSSQL/ORACLE data connectors. 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. 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 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]
