-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #288: Fixed integer mapping for BigQueryQueryRewriter, improved other types mapping, updated BigQuery documentation, fixed bug with an empty table, improved tests
- Loading branch information
1 parent
34e2a49
commit a5aeb00
Showing
24 changed files
with
226 additions
and
152 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
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
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
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
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
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ cd virtual-schemas/jdbc-adapter/ | |
mvn clean -DskipTests package | ||
``` | ||
|
||
The resulting fat JAR is stored in `virtualschema-jdbc-adapter-dist/target/virtualschema-jdbc-adapter-dist-3.0.1.jar`. | ||
The resulting fat JAR is stored in `virtualschema-jdbc-adapter-dist/target/virtualschema-jdbc-adapter-dist-3.0.2.jar`. | ||
|
||
## Uploading the Adapter JAR Archive | ||
|
||
|
@@ -46,8 +46,8 @@ Following steps are required to upload a file to a bucket: | |
1. Now upload the file into this bucket, e.g. using curl (adapt the hostname, BucketFS port, bucket name and bucket write password). | ||
|
||
```bash | ||
curl -X PUT -T virtualschema-jdbc-adapter-dist/target/virtualschema-jdbc-adapter-dist-3.0.1.jar \ | ||
http://w:[email protected]:2580/bucket1/virtualschema-jdbc-adapter-dist-3.0.1.jar | ||
curl -X PUT -T virtualschema-jdbc-adapter-dist/target/virtualschema-jdbc-adapter-dist-3.0.2.jar \ | ||
http://w:[email protected]:2580/bucket1/virtualschema-jdbc-adapter-dist-3.0.2.jar | ||
``` | ||
|
||
If you later need to change the bucket passwords, select the bucket and click "Edit". | ||
|
@@ -84,7 +84,7 @@ CREATE SCHEMA ADAPTER; | |
|
||
CREATE JAVA ADAPTER SCRIPT ADAPTER.JDBC_ADAPTER AS | ||
%scriptclass com.exasol.adapter.RequestDispatcher; | ||
%jar /buckets/your-bucket-fs/your-bucket/virtualschema-jdbc-adapter-dist-3.0.1.jar; | ||
%jar /buckets/your-bucket-fs/your-bucket/virtualschema-jdbc-adapter-dist-3.0.2.jar; | ||
%jar /buckets/your-bucket-fs/your-bucket/<JDBC driver>.jar; | ||
/ | ||
``` | ||
|
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
35 changes: 35 additions & 0 deletions
35
src/main/java/com/exasol/adapter/dialects/bigquery/BigQueryColumnMetadataReader.java
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,35 @@ | ||
package com.exasol.adapter.dialects.bigquery; | ||
|
||
import java.sql.Connection; | ||
import java.sql.Types; | ||
|
||
import com.exasol.adapter.AdapterProperties; | ||
import com.exasol.adapter.dialects.IdentifierConverter; | ||
import com.exasol.adapter.jdbc.BaseColumnMetadataReader; | ||
import com.exasol.adapter.jdbc.JdbcTypeDescription; | ||
import com.exasol.adapter.metadata.DataType; | ||
|
||
/** | ||
* This class implements BigQuery-specific reading of column metadata. | ||
*/ | ||
public class BigQueryColumnMetadataReader extends BaseColumnMetadataReader { | ||
/** | ||
* Create a new instance of the {@link BigQueryColumnMetadataReader}. | ||
* | ||
* @param connection connection to the remote data source | ||
* @param properties user-defined adapter properties | ||
* @param identifierConverter converter between source and Exasol identifiers | ||
*/ | ||
public BigQueryColumnMetadataReader(final Connection connection, final AdapterProperties properties, | ||
final IdentifierConverter identifierConverter) { | ||
super(connection, properties, identifierConverter); | ||
} | ||
|
||
@Override | ||
public DataType mapJdbcType(final JdbcTypeDescription jdbcTypeDescription) { | ||
if (jdbcTypeDescription.getJdbcType() == Types.TIME) { | ||
return DataType.createVarChar(16, DataType.ExaCharset.UTF8); | ||
} | ||
return super.mapJdbcType(jdbcTypeDescription); | ||
} | ||
} |
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
Oops, something went wrong.