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 2022/03/18 11:06:41 UTC

[GitHub] [superset] adrianpostoaca commented on issue #19237: sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-02274: duplicate referential constraint specifications [SQL:

adrianpostoaca commented on issue #19237:
URL: https://github.com/apache/superset/issues/19237#issuecomment-1072305171


   Hi @villebro 
   
   Thank you for your quick feedback.
   
   We've made the change proposed, cleaned Oracle DB schema and run again "docker exec -it superset superset db upgrade". 
   The above ORA-02274 was fixed but unfortunately we encountered another issue:
   
   INFO  [alembic.runtime.migration] Context impl OracleImpl.
   INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade  -> 4e6a06bad7a8, Init
   INFO  [alembic.runtime.migration] Running upgrade 4e6a06bad7a8 -> 5a7bad26f2a7, empty message
   ~~~~~~~~~~~~~
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
       self.dialect.do_execute(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-00904: : invalid identifier
   [SQL:
   CREATE TABLE query (
           id INTEGER NOT NULL,
           client_id VARCHAR2(11 CHAR) NOT NULL,
           database_id INTEGER NOT NULL,
           tmp_table_name VARCHAR2(256 CHAR),
           tab_name VARCHAR2(256 CHAR),
           sql_editor_id VARCHAR2(256 CHAR),
           user_id INTEGER,
           status VARCHAR2(16 CHAR),
           name VARCHAR2(256 CHAR),
           schema VARCHAR2(256 CHAR),
           sql CLOB,
           select_sql CLOB,
           executed_sql CLOB,
           limit INTEGER,
           limit_used SMALLINT,
           select_as_cta SMALLINT,
           select_as_cta_used SMALLINT,
           progress INTEGER,
           rows INTEGER,
           error_message CLOB,
           start_time NUMERIC(20, 6),
           changed_on DATE,
           end_time NUMERIC(20, 6),
           PRIMARY KEY (id),
           FOREIGN KEY(database_id) REFERENCES dbs (id),
           FOREIGN KEY(user_id) REFERENCES ab_user (id),
           CHECK (limit_used IN (0, 1)),
           CHECK (select_as_cta IN (0, 1)),
           CHECK (select_as_cta_used IN (0, 1))
   )
   ~~~~~~~~~~~~~~~~~~~~
   Apparently, "rows" is reserved word in Oracle DB and cannot be used in DDL statement.
   Thank you
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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