ApfelPresse opened a new issue #16541:
URL: https://github.com/apache/superset/issues/16541


   Hey,
   we tried to connect to our Exasol Database and followed the instructions on 
this page
   https://superset.apache.org/docs/databases/exasol
   Well, this did not work quite well, because of a missing dependency 
unixodbc-dev, which is needed by sqlalchemy-exasol.
   We solved that with the steps below, but now we cannot create a Dataset of a 
Database View (Tables are working)
   
   ### Expected results
   
   A Dataset of an Exasol View
   
   ### Actual results
   
   It is not possible to create a Dataset of an Exasol Database View, but 
Tables are working
   
   `
   superset_app | Traceback (most recent call last):
   superset_app | File "/app/superset/datasets/commands/create.py", line 51, in 
run
   superset_app | dataset.fetch_metadata(commit=False)
   superset_app | File "/app/superset/connectors/sqla/models.py", line 1503, in 
fetch_metadata
   superset_app | new_columns = self.external_metadata()
   superset_app | File "/app/superset/connectors/sqla/models.py", line 667, in 
external_metadata
   superset_app | database=self.database, table_name=self.table_name, 
schema_name=self.schema,
   superset_app | File "/app/superset/connectors/sqla/utils.py", line 47, in 
get_physical_table_metadata
   superset_app | raise NoSuchTableError
   superset_app | sqlalchemy.exc.NoSuchTableError: ()
   superset_app | 2021-09-01 
09:30:18,077:WARNING:superset.datasets.commands.create)
   superset_app | Traceback (most recent call last):
   superset_app | File "/app/superset/datasets/commands/create.py", line 51, in 
run
   superset_app | dataset.fetch_metadata(commit=False)
   superset_app | File "/app/superset/connectors/sqla/models.py", line 1503, in 
fetch_metadata
   superset_app | new_columns = self.external_metadata()
   superset_app | File "/app/superset/connectors/sqla/models.py", line 667, in 
external_metadata
   superset_app | database=self.database, table_name=self.table_name, 
schema_name=self.schema,
   superset_app | File "/app/superset/connectors/sqla/utils.py", line 47, in 
get_physical_table_metadata
   superset_app | raise NoSuchTableError
   superset_app | sqlalchemy.exc.NoSuchTableError: ()
   superset_app | Error creating model DatasetRestApi: Dataset could not be 
created.
   superset_app | Traceback (most recent call last):
   superset_app | File "/app/superset/datasets/commands/create.py", line 51, in 
run
   superset_app | dataset.fetch_metadata(commit=False)
   superset_app | File "/app/superset/connectors/sqla/models.py", line 1503, in 
fetch_metadata
   superset_app | new_columns = self.external_metadata()
   superset_app | File "/app/superset/connectors/sqla/models.py", line 667, in 
external_metadata
   superset_app | database=self.database, table_name=self.table_name, 
schema_name=self.schema,
   superset_app | File "/app/superset/connectors/sqla/utils.py", line 47, in 
get_physical_table_metadata
   superset_app | raise NoSuchTableError
   superset_app | sqlalchemy.exc.NoSuchTableError: ()
   superset_app |
   superset_app | The above exception was the direct cause of the following 
exception:
   superset_app |
   superset_app | Traceback (most recent call last):
   superset_app | File "/app/superset/datasets/api.py", line 251, in post
   superset_app | new_model = CreateDatasetCommand(g.user, item).run()
   superset_app | File "/app/superset/datasets/commands/create.py", line 65, in 
run
   superset_app | raise DatasetCreateFailedError() from ex
   superset_app | 
superset.datasets.commands.exceptions.DatasetCreateFailedError: Dataset could 
not be created.
   superset_app | 2021-09-01 09:30:18,079:ERROR:superset.datasets.api:Error 
creating model DatasetRestApi: Dataset could not be created.
   superset_app | Traceback (most recent call last):
   superset_app | File "/app/superset/datasets/commands/create.py", line 51, in 
run
   superset_app | dataset.fetch_metadata(commit=False)
   superset_app | File "/app/superset/connectors/sqla/models.py", line 1503, in 
fetch_metadata
   superset_app | new_columns = self.external_metadata()
   superset_app | File "/app/superset/connectors/sqla/models.py", line 667, in 
external_metadata
   superset_app | database=self.database, table_name=self.table_name, 
schema_name=self.schema,
   superset_app | File "/app/superset/connectors/sqla/utils.py", line 47, in 
get_physical_table_metadata
   superset_app | raise NoSuchTableError
   superset_app | sqlalchemy.exc.NoSuchTableError: ()
   superset_app |
   superset_app | The above exception was the direct cause of the following 
exception:
   superset_app |
   superset_app | Traceback (most recent call last):
   superset_app | File "/app/superset/datasets/api.py", line 251, in post
   superset_app | new_model = CreateDatasetCommand(g.user, item).run()
   superset_app | File "/app/superset/datasets/commands/create.py", line 65, in 
run
   superset_app | raise DatasetCreateFailedError() from ex
   superset_app | 
superset.datasets.commands.exceptions.DatasetCreateFailedError: Dataset could 
not be created.
   `
   
   #### Screenshots
   
   
![image](https://user-images.githubusercontent.com/14179555/131652124-b5e3fc1a-9cad-42cf-a9f0-f90439ab45b8.png)
   
   #### How to reproduce the bug
   
   Steps we did to install the exasol odbc driver:
   
   First, we added the pip dep to the requirements-local.txt, as describes in 
the documentation (only 2.0.10 is working properly)
   `
   cat <<EOT >> ./docker/requirements-local.txt
   sqlalchemy-exasol==2.0.10
   EOT
   `
   
   Then we modified the Dockerfile, to add the missing dependency unixodbc-dev
   
   `
   cat <<EOT >> Dockerfile
   FROM apache/superset:latest-dev
   USER root
   RUN apt-get update && apt-get install -y unixodbc-dev
   
   RUN wget 
https://www.exasol.com/support/secure/attachment/135973/EXASOL_ODBC-7.1.0.tar.gz
 -O exasol_odbc.tar.gz
   RUN tar -xzf exasol_odbc.tar.gz
   RUN mv EXASOL_ODBC-7.* exasol_odbc
   CMD /app/docker/docker-ci.sh
   EOT
   `
   
   Configured the odbc.ini
   
   `
   cat <<EOT >> .odbc.ini
   [ODBC Data Sources]
   exasolution-uo2214lv2_64 = unixODBC 2.2.14 or later, libversion 2 (64bit)
   
   [exasolution-uo2214lv2_64]
   DRIVER = /app/EXASOL_ODBC-7.0.9/lib/linux/x86_64/libexaodbc-uo2214lv2.so
   EXAHOST = dap-dev.node0..3.exasol.datenbaeren-test.comp.db.de:8563
   EXAUID = ETL_USER
   EXAPWD = <PASS>
   [exasolution-uo2214lv2_64-debug]
   DRIVER = /app/EXASOL_ODBC-7.0.9/lib/linux/x86_64/libexaodbc-uo2214lv2.so
   EXAHOST = dap-dev.node0..3.exasol.datenbaeren-test.comp.db.de:8563
   EXAUID = ETL_USER
   EXAPWD = <PASS>
   EXALOGFILE = /home/ubuntu/test/EXASOL_ODBC-7.0.9/exaodbc.log
   LOGMODE = Debug Comm
   EOT
   `
   
   Connection String
   
   exa+pyodbc://USER:XXXXXXXXXX@IP:PORT/SCHEMA?driver=EXAODBC
   
   ### Environment
   
   we used the latest superset version
   
   - superset version: latest
   - python version: we did not change anything
   - node.js version: we did not change anything


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to