Skip to content

Commit

Permalink
Merge pull request #128 from neojunjie/oracle_patch
Browse files Browse the repository at this point in the history
workaround for oracle.py
  • Loading branch information
neojunjie authored Oct 2, 2023
2 parents c1f44e6 + b88aa2c commit 3ce43eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions metadata-ingestion/src/datahub/ingestion/source/sql/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, inspector_instance: Inspector):

def get_schema_names(self) -> List[str]:
logger.debug("OracleInspectorObjectWrapper is in used")
s = "SELECT username FROM dba_users ORDER BY username"
s = "SELECT username FROM all_users ORDER BY username"
cursor = self._inspector_instance.bind.execute(s)
return [
self._inspector_instance.dialect.normalize_name(row[0])
Expand All @@ -132,7 +132,7 @@ def get_table_names(
if schema is None:
schema = self._inspector_instance.dialect.default_schema_name

sql_str = "SELECT table_name FROM dba_tables WHERE "
sql_str = "SELECT table_name FROM all_tables WHERE "
if self.exclude_tablespaces:
tablespace_str = ", ".join([f"'{ts}'" for ts in self.exclude_tablespaces])
sql_str += (
Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion/tests/integration/oracle/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class OracleSourceMockDataBase:
"""

MOCK_DATA = {
"SELECT username FROM dba_users ORDER BY username": (["schema1"], ["schema2"]),
"SELECT username FROM all_users ORDER BY username": (["schema1"], ["schema2"]),
"schema1": (["test1"], ["test2"]),
"schema2": (["test3"], ["test4"]),
}
Expand Down

0 comments on commit 3ce43eb

Please sign in to comment.