You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here the check of whether the table_name exists in the schema is performed, without considering the case when table_name=view, the check here should be table_name in tables or table_name in views
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
2021-09-07 23:39:39,426:WARNING:superset.datasets.commands.create:()
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
Error creating model DatasetRestApi: Dataset could not be created.
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/datasets/api.py", line 251, in post
new_model = CreateDatasetCommand(g.user, item).run()
File "/app/superset/datasets/commands/create.py", line 65, in run
raise DatasetCreateFailedError() from ex
superset.datasets.commands.exceptions.DatasetCreateFailedError: Dataset could not be created.
2021-09-07 23:39:39,428:ERROR:superset.datasets.api:Error creating model DatasetRestApi: Dataset could not be created.
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/datasets/api.py", line 251, in post
new_model = CreateDatasetCommand(g.user, item).run()
File "/app/superset/datasets/commands/create.py", line 65, in run
raise DatasetCreateFailedError() from ex
The text was updated successfully, but these errors were encountered:
Error creating Elasticsearch Dataset, raise NoSuchTable Exception
Expected results
create success
Actual results
create error
Screenshots
Environment
(please complete the following information):
docker: apache/superset:latest
superset version
python --version
node -v
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
By troubleshooting, I found that the error occurs when I select ES-view (actually alias), and is created correctly if the real Index is selected.
superset/superset/connectors/sqla/utils.py
Lines 37 to 47 in 37c2020
Here the check of whether the table_name exists in the schema is performed, without considering the case when table_name=view, the check here should be
table_name in tables or table_name in views
cc: @junlincc @zhaoyongjie
traceback
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
2021-09-07 23:39:39,426:WARNING:superset.datasets.commands.create:()
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
Error creating model DatasetRestApi: Dataset could not be created.
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/datasets/api.py", line 251, in post
new_model = CreateDatasetCommand(g.user, item).run()
File "/app/superset/datasets/commands/create.py", line 65, in run
raise DatasetCreateFailedError() from ex
superset.datasets.commands.exceptions.DatasetCreateFailedError: Dataset could not be created.
2021-09-07 23:39:39,428:ERROR:superset.datasets.api:Error creating model DatasetRestApi: Dataset could not be created.
Traceback (most recent call last):
File "/app/superset/datasets/commands/create.py", line 51, in run
dataset.fetch_metadata(commit=False)
File "/app/superset/connectors/sqla/models.py", line 1499, in fetch_metadata
new_columns = self.external_metadata()
File "/app/superset/connectors/sqla/models.py", line 663, in external_metadata
database=self.database, table_name=self.table_name, schema_name=self.schema,
File "/app/superset/connectors/sqla/utils.py", line 47, in get_physical_table_metadata
raise NoSuchTableError
sqlalchemy.exc.NoSuchTableError: ()
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/datasets/api.py", line 251, in post
new_model = CreateDatasetCommand(g.user, item).run()
File "/app/superset/datasets/commands/create.py", line 65, in run
raise DatasetCreateFailedError() from ex
The text was updated successfully, but these errors were encountered: