Skip to content

Commit

Permalink
#58: Added option to keep original column name for auto inference (#59)
Browse files Browse the repository at this point in the history
* #58: Update dependencies

* Upgrade azurite
  • Loading branch information
kaklakariada committed Jun 17, 2024
1 parent 40350a8 commit 30a219a
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependencies_update.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 21 additions & 23 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.generate.finalModifiers": "explicit",
"source.fixAll": "explicit"
},
"java.codeGeneration.useBlocks": true,
"java.saveActions.organizeImports": true,
"java.sources.organizeImports.starThreshold": 3,
"java.sources.organizeImports.staticStarThreshold": 3,
"java.test.config": {
"vmArgs": [
"-Djava.util.logging.config.file=src/test/resources/logging.properties",
"-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"
]
},
"[json]": {
"editor.indentSize": 2
},
"sonarlint.connectedMode.project": {
"connectionId": "exasol",
"projectKey": "com.exasol:azure-blob-storage-document-files-virtual-schema"
}
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.generate.finalModifiers": "explicit",
"source.fixAll": "explicit"
},
"java.codeGeneration.useBlocks": true,
"java.saveActions.organizeImports": true,
"java.sources.organizeImports.starThreshold": 3,
"java.sources.organizeImports.staticStarThreshold": 3,
"java.test.config": {
"vmArgs": [
"-Djava.util.logging.config.file=src/test/resources/logging.properties",
"-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl",
"-Dcom.exasol.dockerdb.image=8.27.0"
]
},
"sonarlint.connectedMode.project": {
"connectionId": "exasol",
"projectKey": "com.exasol:azure-blob-storage-document-files-virtual-schema"
}
}
6 changes: 0 additions & 6 deletions dependencies.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions doc/changes/changes_2.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Virtual Schema for Document Data in Files on Azure Blob Storage 2.1.0, released 2024-06-17

Code name: Configure column names for automatic mapping inference

## Summary

This release allows configuring the mapping of column names for the automatic mapping inference in Parquet and CSV files. Before, the virtual schema always converted source column names to `UPPER_SNAKE_CASE` to create the Exasol column names. This is now configurable with EDML property `autoInferenceColumnNames`. This property supports the following values:
* `CONVERT_TO_UPPER_SNAKE_CASE`: Convert column names to `UPPER_SNAKE_CASE` (default).
* `KEEP_ORIGINAL_NAME`: Do not convert column names, use column name from source.

See the [EDML user guide](https://github.com/exasol/virtual-schema-common-document/blob/main/doc/user_guide/edml_user_guide.md#column-name-conversion) for details.

## Features

* #58: Added option to keep original column name for auto inference

## Dependency Updates

### Compile Dependency Updates

* Updated `com.azure:azure-storage-blob:12.25.3` to `12.26.1`
* Updated `com.exasol:virtual-schema-common-document-files:8.0.4` to `8.1.0`
* Updated `org.slf4j:slf4j-jdk14:2.0.12` to `2.0.13`

### Runtime Dependency Updates

* Removed `com.azure:azure-core-http-netty:1.14.2`

### Test Dependency Updates

* Updated `com.exasol:exasol-test-setup-abstraction-java:2.1.2` to `2.1.4`
* Updated `com.exasol:virtual-schema-common-document-files:8.0.4` to `8.1.0`
* Updated `org.mockito:mockito-core:5.11.0` to `5.12.0`
* Updated `org.testcontainers:junit-jupiter:1.19.7` to `1.19.8`

### Plugin Dependency Updates

* Updated `com.exasol:project-keeper-maven-plugin:4.3.2` to `4.3.3`
4 changes: 2 additions & 2 deletions doc/user_guide/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Next create the Adapter Script:
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.AZURE_BLOB_STORAGE_FILES_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-8.0.4-azure-blob-storage-2.0.5.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-8.1.0-azure-blob-storage-2.1.0.jar;
/
```

Expand All @@ -30,7 +30,7 @@ CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_AZURE_BLOB_STORAGE_DOCUMEN
CONNECTION_NAME VARCHAR(500))
EMITS(...) AS
%scriptclass com.exasol.adapter.document.UdfEntryPoint;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-8.0.4-azure-blob-storage-2.0.5.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-8.1.0-azure-blob-storage-2.1.0.jar;
/
```

Expand Down
2 changes: 1 addition & 1 deletion pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 9 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<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>
<artifactId>azure-blob-storage-document-files-virtual-schema</artifactId>
<version>2.0.5</version>
<version>2.1.0</version>
<name>Virtual Schema for document data in files on Azure Blob Storage</name>
<description>Adapter for document data access from files from Azure Blob Storage.</description>
<url>https://github.com/exasol/azure-blob-storage-document-files-virtual-schema/</url>
<properties>
<vs-common-document-files.version>8.0.4</vs-common-document-files.version>
<vs-common-document-files.version>8.1.0</vs-common-document-files.version>
</properties>
<profiles>
<profile>
Expand Down Expand Up @@ -40,14 +40,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.25.3</version>
</dependency>
<dependency>
<!-- Fix CVE-2024-29025 in io.netty:netty-codec-http via azure-storage-blob -->
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.14.2</version>
<scope>runtime</scope>
<version>12.26.1</version>
</dependency>
<!-- Test dependencies -->
<dependency>
Expand All @@ -72,13 +65,13 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.11.0</version>
<version>5.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.7</version>
<version>1.19.8</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -102,7 +95,7 @@
<dependency>
<groupId>com.exasol</groupId>
<artifactId>exasol-test-setup-abstraction-java</artifactId>
<version>2.1.2</version>
<version>2.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -115,7 +108,7 @@
<!-- Enable log output for integration tests -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>2.0.12</version>
<version>2.0.13</version>
</dependency>
</dependencies>
<build>
Expand Down Expand Up @@ -153,7 +146,7 @@
<plugin>
<groupId>com.exasol</groupId>
<artifactId>project-keeper-maven-plugin</artifactId>
<version>4.3.2</version>
<version>4.3.3</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -188,7 +181,7 @@
<parent>
<artifactId>azure-blob-storage-document-files-virtual-schema-generated-parent</artifactId>
<groupId>com.exasol</groupId>
<version>2.0.5</version>
<version>2.1.0</version>
<relativePath>pk_generated_parent.pom</relativePath>
</parent>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import jakarta.json.*;

public class IntegrationTestSetup implements AutoCloseable {
private static final String ADAPTER_JAR = "document-files-virtual-schema-dist-8.0.4-azure-blob-storage-2.0.5.jar";
private static final String ADAPTER_JAR = "document-files-virtual-schema-dist-8.1.0-azure-blob-storage-2.1.0.jar";
private final ExasolTestSetup exasolTestSetup;
private final Connection exasolConnection;
private final Statement exasolStatement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class LocalAbsTestSetup implements AbsTestSetup {

public LocalAbsTestSetup() {
// https://mcr.microsoft.com/en-us/product/azure-storage/azurite/tags
this.azuriteContainer = new GenericContainer<>("mcr.microsoft.com/azure-storage/azurite:3.29.0");
this.azuriteContainer = new GenericContainer<>("mcr.microsoft.com/azure-storage/azurite:3.30.0");
this.azuriteContainer.addExposedPort(PORT_IN_CONTAINER);
this.azuriteContainer.start();
createAzuriteBlobServiceClient();
Expand Down

0 comments on commit 30a219a

Please sign in to comment.