exasol / dynamodb-virtual-schema

Virtual Schema for accessing Amazon AWS DynamoDB through Exasol
MIT License
1 stars 1 forks source link

Path of json mapping not correctly interpreted #153

Closed ThomasBestfleisch closed 3 years ago

ThomasBestfleisch commented 3 years ago

I have my mapping file in Bucket FS at the following path: /buckets/bfsdefault/virtualschema/products_mapping_dynamo_db.json

Trying to create the VS: CREATE VIRTUAL SCHEMA DYNAMODB_VS USING ADAPTER.DYNAMODB_ADAPTER WITH CONNECTION_NAME = 'DYNAMO_CONNECTION' SQL_DIALECT = 'DYNAMO_DB' MAPPING = '/buckets/bfsdefault/virtualschema/products_mapping_dynamo_db.json'

I'm getting an error: [Code: 0, SQL State: 22002] VM error: F-UDF-CL-LIB-1126: F-UDF-CL-SL-JAVA-1006: F-UDF-CL-SL-JAVA-1026: com.exasol.ExaUDFException: F-UDF-CL-SL-JAVA-1068: Exception during singleCall adapterCall com.exasol.adapter.AdapterException: The specified mapping file (/buckets/buckets/bfsdefault/virtualschema/products_mapping_dynamo_db.json) could not be found. Make sure you uploaded your mapping definition to BucketFS and specified the correct bucketfs, bucket and path within the bucket. com.exasol.adapter.document.DocumentAdapter.getSchemaMappingFile(DocumentAdapter.java:87) com.exasol.adapter.document.DocumentAdapter.getSchemaMappingDefinition(DocumentAdapter.java:59) com.exasol.adapter.document.DocumentAdapter.getSchemaMetadata(DocumentAdapter.java:50) com.exasol.adapter.document.DocumentAdapter.runCreateVirtualSchema(DocumentAdapter.java:44) com.exasol.adapter.document.DocumentAdapter.createVirtualSchema(DocumentAdapter.java:34) com.exasol.adapter.RequestDispatcher.dispatchCreateVirtualSchemaRequestToAdapter(RequestDispatcher.java:110) com.exasol.adapter.RequestDispatcher.processRequest(RequestDispatcher.java:70) com.exasol.adapter.RequestDispatcher.executeAdapterCall(RequestDispatcher.java:52) com.exasol.adapter.RequestDispatcher.adapterCall(RequestDispatcher.java:41) com.exasol.ExaWrapper.runSingleCall(ExaWrapper.java:100) (Session: 1684426175232540673)

I have to delete the /buckets prefix in the path to make it work:

CREATE VIRTUAL SCHEMA DYNAMODB_VS USING ADAPTER.DYNAMODB_ADAPTER WITH CONNECTION_NAME = 'DYNAMO_CONNECTION' SQL_DIALECT = 'DYNAMO_DB' MAPPING = '/bfsdefault/virtualschema/products_mapping_dynamo_db.json'

jakobbraun commented 3 years ago

We already fixed this in the virtual-schemas-common-jdbc: https://github.com/exasol/virtual-schema-common-document/issues/47 With the next release the fix will be rolled out.