datahub-project / datahub

The Metadata Platform for your Data Stack
https://datahubproject.io
Apache License 2.0
9.68k stars 2.86k forks source link

Oracle (12.1.0.2.0 - version) Ingestion #6776

Closed FelipeArruda closed 1 year ago

FelipeArruda commented 1 year ago

Describe the bug Getting error while trying to connect to Oracle version 12.1.0.2.0 through the UI.

To Reproduce I'm using this configs to ingest metadata from Oracle, but always gets error.

source:
    type: oracle
    config:
        schema_pattern:
            allow:
                - admin
        env: qa
        password: '${ORACLE_PASSWORD}'
        host_port: 'host:1521'
        database: db
        username: '${ORACLE_USERNAME}'
sink:
    type: datahub-rest
    config:
        server: 'http://datahub-datahub-gms:8080'
        token: hidden

When I run the job, I got the error.

'sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-00942: table or view does not exist\n'
           '[SQL: SELECT username FROM dba_users ORDER BY username]\n'
           '(Background on this error at: http://sqlalche.me/e/13/4xp6)\n'
           '[2022-12-15 13:59:51,098] ERROR    {datahub.entrypoints:195} - Command failed: \n'
           '\t(cx_Oracle.DatabaseError) ORA-00942: table or view does not exist\n'
           '[SQL: SELECT username FROM dba_users ORDER BY username]\n'
           '(Background on this error at: http://sqlalche.me/e/13/4xp6) due to \n'
           "\t\t'ORA-00942: table or view does not exist'.\n"

Tested the Oracle permission (through SQLDeveloper) to user and user are able to select on dba_users (SELECT username FROM dba_users ORDER BY username). Permission gave to user:

I tried with Oracle 19.11.0.0 version and no problem occur.

Expected behavior None

Screenshots None

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

FelipeArruda commented 1 year ago

Solved with grant : grant select_catalog_role to public;