Skip to content

Commit

Permalink
#314: implemented switch for IMPORT statement for BigQuery dialect (#315
Browse files Browse the repository at this point in the history
)

* #314: implemented switch for IMPORT statement for BigQuery dialect
* #314: adjusted documentation
  • Loading branch information
AnastasiiaSergienko authored Feb 18, 2020
1 parent a5aeb00 commit 89f9d5e
Show file tree
Hide file tree
Showing 29 changed files with 148 additions and 226 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ This is an open source project which is officially supported by Exasol. For any
## Information for Users

* [User Guide](doc/user-guide/user_guide.md)
* [Deployment Guide](doc/user-guide/deploying_the_virtual_schema_adapter.md)

Supported dialects:

Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/athena.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/AthenaJDBC42-<JDBC driver version>.jar;
/
;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/aurora.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/postgresql-<JDBC driver version>.jar;
/
```
Expand Down
41 changes: 21 additions & 20 deletions doc/dialects/bigquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Download the [Simba JDBC Driver for Google BigQuery](https://cloud.google.com/bi
## Uploading the JDBC Driver to EXAOperation

1. [Create a bucket in BucketFS](https://docs.exasol.com/administration/on-premise/bucketfs/create_new_bucket_in_bucketfs_service.htm)
1. Upload the driver to BucketFS
1. [Upload the driver to BucketFS](https://docs.exasol.com/administration/on-premise/bucketfs/accessfiles.htm)

Hint: Magnitude Simba driver contains a lot of jar files, but you can upload all of them together as an archive (`.tar.gz`, for example).
**Hint**: Magnitude Simba driver contains a lot of jar files, but you can upload all of them together as an archive (`.tar.gz`, for example).
The archive will be unpacked automatically in the bucket and you can access the files using the following path pattern '<your bucket>/<archive's name without extension>/<name of a file form the archive>.jar'

Leave only `.jar` files in the archive. It will help you to generate a list for adapter script later.

## Installing the Adapter Script

Upload the latest available release of [Virtual Schema JDBC Adapter](https://github.com/exasol/virtual-schemas/releases) to Bucket FS.
Expand All @@ -26,32 +28,27 @@ CREATE SCHEMA SCHEMA_FOR_VS_SCRIPT;

The SQL statement below creates the adapter script, defines the Java class that serves as entry point and tells the UDF framework where to find the libraries (JAR files) for Virtual Schema and database driver.

Please remember to check the versions of your JAR files after downloading driver. They can differ from the list below.
List all the JAR files from Magnitude Simba JDBC driver.

```sql
CREATE JAVA ADAPTER SCRIPT SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_BIGQUERY AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/avro-1.8.2.jar;
%jar /buckets/<BFS service>/<bucket>/gax-1.42.0.jar;
%jar /buckets/<BFS service>/<bucket>/google-api-client-1.28.0.jar;
%jar /buckets/<BFS service>/<bucket>/google-api-services-bigquery-v2-rev426-1.25.0.jar;
%jar /buckets/<BFS service>/<bucket>/google-auth-library-credentials-0.15.0.jar;
%jar /buckets/<BFS service>/<bucket>/google-auth-library-oauth2-http-0.13.0.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/GoogleBigQueryJDBC42.jar;
%jar /buckets/<BFS service>/<bucket>/google-http-client-1.29.0.jar;
%jar /buckets/<BFS service>/<bucket>/google-http-client-jackson2-1.28.0.jar;
%jar /buckets/<BFS service>/<bucket>/google-oauth-client-1.28.0.jar;
%jar /buckets/<BFS service>/<bucket>/grpc-context-1.18.0.jar;
%jar /buckets/<BFS service>/<bucket>/guava-26.0-android.jar
%jar /buckets/<BFS service>/<bucket>/jackson-core-2.9.6.jar;
%jar /buckets/<BFS service>/<bucket>/joda-time-2.10.1.jar;
%jar /buckets/<BFS service>/<bucket>/opencensus-api-0.18.0.jar;
%jar /buckets/<BFS service>/<bucket>/opencensus-contrib-http-util-0.18.0.jar;
...
...
...
/
;
```

**Hint**: to avoid filling the list by hands, use a convenience UDF script [bucketfs_ls](https://github.com/exasol/exa-toolbox/blob/master/utilities/bucketfs_ls.sql).
Create a script and run it as in the following example:

```sql
SELECT '%jar /buckets/<BFS service>/<bucket>/<archive's name without extension if used>/'|| files || ';' FROM (SELECT EXA_toolbox.bucketfs_ls('/buckets/<BFS service>/<bucket>/<archive's name without extension if used>/') files );
```

## Defining a Named Connection

Please follow the [Authenticating to a Cloud API Service article](https://cloud.google.com/docs/authentication/) to get Google service account credentials.
Expand Down Expand Up @@ -101,11 +98,15 @@ If you need to use currently unsupported data types or find a way around known l
## Performance

Please be aware that the current implementation of the dialect can only handle result sets with limited size (a few thousand rows).
If you need to process a large amount of data, please contact our support team. Another implementation of the dialect with a performance improvement (using `IMPORT INTO`) is available, but not documented for self-service because of

1. the complex installation process
2. security risks (a user has to disable the drivers' security manager to use it)

## Testing information

In the following matrix you find combinations of JDBC driver and dialect version that we tested.

Virtual Schema Version| Big Query Version | Driver Name | Driver Version
----------------------|---------------------|---------------------------------------------|------------------------
3.0.2 | Google BigQuery 2.0 | Magnitude Simba JDBC driver for BigQuery | 1.2.2.1004
3.0.2 | Google BigQuery 2.0 | Magnitude Simba JDBC driver for BigQuery | 1.2.2.1004
4 changes: 2 additions & 2 deletions doc/dialects/db2.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/db2jcc4.jar;
%jar /buckets/<BFS service>/<bucket>/db2jcc_license_cu.jar;
/
Expand All @@ -68,7 +68,7 @@ CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/db2jcc4.jar;
%jar /buckets/<BFS service>/<bucket>/db2jcc_license_cu.jar;
%jar /buckets/<BFS service>/<bucket>/db2jcc_license_cisuz.jar;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/exasol.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
/
```

Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/jars/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/jars/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/jars/HiveJDBC41.jar;
/
```
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/impala.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/ImpalaJDBC41.jar;
/
;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/mysql-connector-java-<version>.jar;
/
;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/ojdbc<JDBC driver version>.jar;
/
;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/postgresql-<version>.jar;
/
```
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/redshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/RedshiftJDBC42-<JDBC driver version>.jar;
/
;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/saphana.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/ngdbc-<JDBC driver version>.jar;
/
;
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/sql_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/jtds.jar;
/
```
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/sybase.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/jtds-<version>.jar;
/
```
Expand Down
2 changes: 1 addition & 1 deletion doc/dialects/teradata.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The SQL statement below creates the adapter script, defines the Java class that
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.0.2.jar;
%jar /buckets/<BFS service>/<bucket>/virtualschema-jdbc-adapter-dist-3.1.0.jar;
%jar /buckets/<BFS service>/<bucket>/terajdbc4.jar;
%jar /buckets/<BFS service>/<bucket>/tdgssconfig.jar;
/
Expand Down
92 changes: 0 additions & 92 deletions doc/user-guide/deploying_the_virtual_schema_adapter.md

This file was deleted.

Loading

0 comments on commit 89f9d5e

Please sign in to comment.