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

Using oracle as DataSource in superset with Docker #9216

Closed
ilyakitaev opened this issue Feb 27, 2020 · 5 comments
Closed

Using oracle as DataSource in superset with Docker #9216

ilyakitaev opened this issue Feb 27, 2020 · 5 comments
Labels
inactive Inactive for >= 30 days

Comments

@ilyakitaev
Copy link

ilyakitaev commented Feb 27, 2020

Hello, just as a solution and for future development.

Quick fix

  1. First you need to download oracle client with libraries and put them into superset image
  2. install cx_Oracle and libaio1 inside container
    apt update; apt install -y libaio1; pip install cx_Oracle
  3. For normal language support set env variable in the docker/.env
    NLS_LANG=RUSSIAN_RUSSIA.AL32UTF8 # for Russian with UTF-8
  4. Superset does not detect oracle and uses postgres specs for that datasource. So you need to comment this line to fix SQL Lab error
    superset/db_engine_specs/postgres.py +52
    # cursor.tzinfo_factory = FixedOffsetTimezone

hope it will be helpfull

@ilyakitaev ilyakitaev changed the title Using oracle as DataSource Using oracle as DataSource in superset with Docker Feb 27, 2020
@stale
Copy link

stale bot commented Apr 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 28, 2020
@stale stale bot closed this as completed May 6, 2020
@nk-fouque
Copy link

I think I have the problem you fix with your 4th point, but doing that didn't change anything, should I restart something ?

@ilyakitaev
Copy link
Author

I think I have the problem you fix with your 4th point, but doing that didn't change anything, should I restart something ?

can you provide any logs? That was quickfix for demo, m.b. I can help you

@nk-fouque
Copy link

Thanks
The only error I have is when I run queries in SQL Lab : oracle error: 'cx_Oracle.Cursor' object has no attribute 'tzinfo_factory'
I run it from the docker image so I don't really know where to look for the logs, I can provide them if you tell me

@ilyakitaev
Copy link
Author

Thanks
The only error I have is when I run queries in SQL Lab : oracle error: 'cx_Oracle.Cursor' object has no attribute 'tzinfo_factory'
I run it from the docker image so I don't really know where to look for the logs, I can provide them if you tell me

m.b. you really need to restart container with docker-compose restart after fixing sources. If you recreate containers with down/up your fix will be removed

You can view logs with docker-compose logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

2 participants