forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d52f63
commit 4c8704c
Showing
16 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
==================== | ||
HANA Connector | ||
==================== | ||
|
||
The HANA connector allows querying and creating tables in an | ||
external HANA database. This can be used to join data between | ||
different systems like HANA and Hive, or between two different | ||
HANA instances. | ||
|
||
Configuration | ||
------------- | ||
|
||
To configure the HANA connector, create a catalog properties file | ||
in ``etc/catalog`` named, for example, ``hana.properties``, to | ||
mount the HANA connector as the ``hana`` catalog. | ||
|
||
Create the file with the following contents, replacing the | ||
connection properties as appropriate for your setup: | ||
|
||
.. code-block:: none | ||
connector.name=hana | ||
connection-url=jdbc:sap://[serverName[\instanceName][:portNumber]] | ||
connection-user=root | ||
connection-password=secret | ||
Multiple HANA Databases or Servers | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The HANA connector can only access a single database within | ||
a HANA server. If you have multiple HANA databases, | ||
or want to connect to multiple HANA instances, you must configure | ||
multiple catalogs, one for each instance. | ||
|
||
To add another catalog, add another properties file to ``etc/catalog`` | ||
with a different name (making sure it ends in ``.properties``). For example, | ||
if you name the property file ``sales.properties``, Presto will create a | ||
catalog named ``sales`` using the configured connector. | ||
|
||
General Configuration Properties | ||
--------------------------------- | ||
|
||
================================================== ==================================================================== =========== | ||
Property Name Description Default | ||
================================================== ==================================================================== =========== | ||
``user-credential-name`` Name of the ``extraCredentials`` property whose value is the JDBC | ||
driver's user name. See ``extraCredentials`` in `Parameter Reference | ||
<https://prestodb.io/docs/current/installation/jdbc.html | ||
#parameter-reference>`_. | ||
|
||
``password-credential-name`` Name of the ``extraCredentials`` property whose value is the JDBC | ||
driver's user password. See ``extraCredentials`` in `Parameter | ||
Reference <https://prestodb.io/docs/current/installation/jdbc.html | ||
#parameter-reference>`_. | ||
|
||
``case-insensitive-name-matching`` Match dataset and table names case-insensitively. ``false`` | ||
|
||
``case-insensitive-name-matching.cache-ttl`` Duration for which remote dataset and table names will be | ||
cached. Set to ``0ms`` to disable the cache. ``1m`` | ||
================================================== ==================================================================== =========== | ||
|
||
Querying HANA | ||
------------------- | ||
|
||
The HANA connector provides access to all schemas visible to the specified user in the configured database. | ||
For the following examples, assume the HANA catalog is ``hana``. | ||
|
||
You can see the available schemas by running ``SHOW SCHEMAS``:: | ||
|
||
SHOW SCHEMAS FROM hana; | ||
|
||
If you have a schema named ``web``, you can view the tables | ||
in this schema by running ``SHOW TABLES``:: | ||
|
||
SHOW TABLES FROM hana.web; | ||
|
||
You can see a list of the columns in the ``clicks`` table in the ``web`` database | ||
using either of the following:: | ||
|
||
DESCRIBE hana.web.clicks; | ||
SHOW COLUMNS FROM hana.web.clicks; | ||
|
||
Finally, you can query the ``clicks`` table in the ``web`` schema:: | ||
|
||
SELECT * FROM hana.web.clicks; | ||
|
||
If you used a different name for your catalog properties file, use | ||
that catalog name instead of ``hana`` in the above examples. | ||
|
||
HANA Connector Limitations | ||
-------------------------------- | ||
|
||
The following SQL statements are not supported: | ||
|
||
* :doc:`/sql/delete` | ||
* :doc:`/sql/grant` | ||
* :doc:`/sql/revoke` | ||
* :doc:`/sql/show-grants` | ||
* :doc:`/sql/show-roles` | ||
* :doc:`/sql/show-role-grants` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-root</artifactId> | ||
<version>0.285-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>presto-hana</artifactId> | ||
<description>Presto - HANA Connector</description> | ||
<packaging>presto-plugin</packaging> | ||
|
||
<properties> | ||
<air.main.basedir>${project.parent.basedir}</air.main.basedir> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-base-jdbc</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.airlift</groupId> | ||
<artifactId>log</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.airlift</groupId> | ||
<artifactId>configuration</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.inject</groupId> | ||
<artifactId>guice</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.sap.cloud.db.jdbc</groupId> | ||
<artifactId>ngdbc</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
</dependency> | ||
|
||
<!-- Presto SPI --> | ||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-spi</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-common</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.drift</groupId> | ||
<artifactId>drift-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.airlift</groupId> | ||
<artifactId>slice</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.airlift</groupId> | ||
<artifactId>units</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- for testing --> | ||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-testng-services</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-testing-docker</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.testng</groupId> | ||
<artifactId>testng</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.airlift</groupId> | ||
<artifactId>testing</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.airlift</groupId> | ||
<artifactId>json</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-main</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-tpch</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.airlift.tpch</groupId> | ||
<artifactId>tpch</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.facebook.presto</groupId> | ||
<artifactId>presto-tests</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jetbrains</groupId> | ||
<artifactId>annotations</artifactId> | ||
<version>19.0.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<profiles> | ||
<profile> | ||
<id>ci</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<excludes combine.self="override" /> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
Oops, something went wrong.