Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle Connection #23

Open
gpf-mec opened this issue Mar 6, 2023 · 0 comments
Open

Oracle Connection #23

gpf-mec opened this issue Mar 6, 2023 · 0 comments

Comments

@gpf-mec
Copy link

gpf-mec commented Mar 6, 2023

MSSQL fixed with st2 pack install https://github.com/baskraai/stackstorm-sql but oracle wont...

action.ref: sql.query
context.user: st2admin
parameters:
  database: my-oracle-db
  drivername: oracle
  host: my-hostname
  password: 'my-password'
  port: 1521
  query: SELECT 1 FROM dual;
  username: my-username
status: failed
start_timestamp: Mon, 06 Mar 2023 10:53:51 UTC
end_timestamp: Mon, 06 Mar 2023 10:53:51 UTC
result:
  exit_code: 1
  result: None
  stderr: "Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 395, in <module>
    obj.run()
  File "/opt/stackstorm/st2/lib/python3.8/site-packages/python_runner/python_action_wrapper.py", line 214, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/sql/actions/generic_query.py", line 21, in run
    with self.db_connection(kwargs_dict) as conn:
  File "/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/opt/stackstorm/packs/sql/actions/lib/base_action.py", line 133, in db_connection
    self.engine = sqlalchemy.create_engine(database_connection_string, echo=False)
  File "<string>", line 2, in create_engine
  File "/opt/stackstorm/virtualenvs/sql/lib64/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 277, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
  File "/opt/stackstorm/virtualenvs/sql/lib64/python3.8/site-packages/sqlalchemy/engine/create.py", line 618, in create_engine
    dialect = dialect_cls(**dialect_args)
  File "<string>", line 2, in __init__
  File "/opt/stackstorm/virtualenvs/sql/lib64/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 277, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
  File "/opt/stackstorm/virtualenvs/sql/lib64/python3.8/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py", line 1036, in __init__
    dbapi_module.DB_TYPE_NVARCHAR,  # used for CLOB, NCLOB
AttributeError: module 'cx_Oracle' has no attribute 'DB_TYPE_NVARCHAR'
"
  stdout: ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant