You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/01/16 11:11:17 UTC

[GitHub] joicemjoseph opened a new issue #6705: Unable to use cockroach db database as database source

joicemjoseph opened a new issue #6705: Unable to use cockroach db database as database source
URL: https://github.com/apache/incubator-superset/issues/6705
 
 
   I was able to test the and save the connection. But when I try to create table definition out of it, it says
   `table [tableName] could not be found. Please double check database, schema and table.`
   
   Latest SQLAlchemy dialect for cockroach db have been installed
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [ x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ x] I have reproduced the issue with at least the latest released version of superset.
   - [ x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   
   ### Superset version
   Superset version: 0.28.1
   CochroachDB version: 2.1.8
   cockroachdb version: 0.2.1
   ### Expected results
   Should be able to save table definition successfully.
   
   ### Actual results
   table [tableName] could not be found. Please double check database, schema and table.
   
   ### Steps to reproduce
   -> create new source
   -> put `cockroach db source string`as sqlalchemy URI
   -> test the connection and save it as data source.
   -> import table definition
   -> select cockroach db as source and table name and save
   
   First trace
   > Traceback (most recent call last):
     File "/venv/local/lib/python3.6/site-packages/superset/connectors/sqla/views.py", line 256, in pre_add
       table.get_sqla_table_object()
     File "/venv/local/lib/python3.6/site-packages/superset/connectors/sqla/models.py", line 804, in get_sqla_table_object
       return self.database.get_table(self.table_name, schema=self.schema)
     File "/venv/local/lib/python3.6/site-packages/superset/models/core.py", line 931, in get_table
       autoload_with=self.get_sqla_engine())
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 457, in __new__
       metadata._remove_table(name, schema)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
       compat.reraise(exc_type, exc_value, exc_tb)
     File "/WIP/venv/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 249, in reraise
       raise value
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 452, in __new__
       table._init(name, metadata, *args, **kw)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 534, in _init
       include_columns, _extend_on=_extend_on)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 547, in _autoload
       _extend_on=_extend_on
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2056, in run_callable
       return conn.run_callable(callable_, *args, **kwargs)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1545, in run_callable
       return callable_(self, *args, **kwargs)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 391, in reflecttable
       table, include_columns, exclude_columns, **opts)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/reflection.py", line 618, in reflecttable
       table_name, schema, **table.dialect_kwargs):
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/reflection.py", line 369, in get_columns
       **kw)
     File "/venv/local/lib/python3.6/site-packages/cockroachdb/sqlalchemy/dialect.py", line 151, in get_columns
       typ = type_class()
   TypeError: 'NullType' object is not callable
   
   
   Another one
   > Traceback (most recent call last):
     File "/venv/local/lib/python3.6/site-packages/superset/connectors/sqla/views.py", line 256, in pre_add
       table.get_sqla_table_object()
     File "/venv/local/lib/python3.6/site-packages/superset/connectors/sqla/models.py", line 804, in get_sqla_table_object
       return self.database.get_table(self.table_name, schema=self.schema)
     File "/venv/local/lib/python3.6/site-packages/superset/models/core.py", line 931, in get_table
       autoload_with=self.get_sqla_engine())
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 457, in __new__
       metadata._remove_table(name, schema)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
       compat.reraise(exc_type, exc_value, exc_tb)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 249, in reraise
       raise value
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 452, in __new__
       table._init(name, metadata, *args, **kw)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 534, in _init
       include_columns, _extend_on=_extend_on)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 547, in _autoload
       _extend_on=_extend_on
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2056, in run_callable
       return conn.run_callable(callable_, *args, **kwargs)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1545, in run_callable
       return callable_(self, *args, **kwargs)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 391, in reflecttable
       table, include_columns, exclude_columns, **opts)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/reflection.py", line 618, in reflecttable
       table_name, schema, **table.dialect_kwargs):
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/engine/reflection.py", line 369, in get_columns
       **kw)
     File "/venv/local/lib/python3.6/site-packages/cockroachdb/sqlalchemy/dialect.py", line 152, in get_columns
       print(type_class)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py", line 589, in __str__
       return str(self.compile())
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py", line 573, in compile
       return dialect.type_compiler.process(self)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/compiler.py", line 293, in process
       return type_._compiler_dispatch(self, **kw)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/visitors.py", line 81, in _compiler_dispatch
       return meth(self, **kw)
     File "/venv/local/lib/python3.6/site-packages/sqlalchemy/sql/compiler.py", line 2973, in visit_null
       "type on this Column?" % type_)
   sqlalchemy.exc.CompileError: Can't generate DDL for NullType(); did you forget to specify a type on this Column?
   
   
   Images.
   ![Error banner](https://user-images.githubusercontent.com/672445/51245080-9a7d7e00-197e-11e9-8063-d00d8be51ebd.png)
   Error banner
   ![list of tables after test](https://user-images.githubusercontent.com/672445/51245081-9a7d7e00-197e-11e9-8e37-b6d208f2ddfe.png)
   list of tables after test
   ![testing connection success](https://user-images.githubusercontent.com/672445/51245086-9cdfd800-197e-11e9-8a05-2c038a020dd7.png)
   testing connection success
   ![importing table](https://user-images.githubusercontent.com/672445/51245087-9d786e80-197e-11e9-8024-863fe020b72d.png)
   importing table
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org