diff --git a/ingestion/src/metadata/orm_profiler/orm/functions/sum.py b/ingestion/src/metadata/orm_profiler/orm/functions/sum.py index 30abe11e85f..92a042bf08d 100644 --- a/ingestion/src/metadata/orm_profiler/orm/functions/sum.py +++ b/ingestion/src/metadata/orm_profiler/orm/functions/sum.py @@ -60,6 +60,13 @@ def _(element, compiler, **kw): return f"SUM({proc})" +@compiles(SumFn, Dialects.Oracle) +def _(element, compiler, **kw): + """Oracle casting""" + proc = compiler.process(element.clauses, **kw) + return f"SUM(CAST({proc} AS NUMBER))" + + @compiles(SumFn, Dialects.IbmDbSa) @compiles(SumFn, Dialects.Db2) def _(element, compiler, **kw): diff --git a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json index e35c8701658..75d878c5c2a 100644 --- a/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json +++ b/openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/oracleConnection.json @@ -76,10 +76,10 @@ "description": "Connect with oracle by either passing service name or database schema name.", "oneOf": [ { - "$ref": "#/definitions/OracleServiceName" + "$ref": "#/definitions/OracleDatabaseSchema" }, { - "$ref": "#/definitions/OracleDatabaseSchema" + "$ref": "#/definitions/OracleServiceName" } ] },