diff --git a/ingestion/Dockerfile b/ingestion/Dockerfile index 97ce4958217..f212542f0a8 100644 --- a/ingestion/Dockerfile +++ b/ingestion/Dockerfile @@ -57,8 +57,8 @@ USER airflow # Argument to provide for Ingestion Dependencies to install. Defaults to all ARG INGESTION_DEPENDENCY="all" RUN pip install --upgrade pip -RUN pip install --upgrade openmetadata-managed-apis --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-3.9.txt" -RUN pip install --upgrade openmetadata-ingestion[${INGESTION_DEPENDENCY}] +RUN pip install "openmetadata-managed-apis==0.12.2.4" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-3.9.txt" +RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]==0.12.2.4" # Uninstalling psycopg2-binary and installing psycopg2 instead # because the psycopg2-binary generates a architecture specific error # while authrenticating connection with the airflow, psycopg2 solves this error diff --git a/ingestion/Dockerfile.ci b/ingestion/Dockerfile.ci index 366e700a15f..ea6c380cc9f 100644 --- a/ingestion/Dockerfile.ci +++ b/ingestion/Dockerfile.ci @@ -67,7 +67,7 @@ RUN pip install "." WORKDIR /home/airflow/ingestion ARG INGESTION_DEPENDENCY="all" -RUN pip install --upgrade ".[${INGESTION_DEPENDENCY}]" +RUN pip install ".[${INGESTION_DEPENDENCY}]" # Uninstalling psycopg2-binary and installing psycopg2 instead # because the psycopg2-binary generates a architecture specific error diff --git a/ingestion/src/metadata/orm_profiler/orm/functions/sum.py b/ingestion/src/metadata/orm_profiler/orm/functions/sum.py index 4499d96243a..d967c9e9ba3 100644 --- a/ingestion/src/metadata/orm_profiler/orm/functions/sum.py +++ b/ingestion/src/metadata/orm_profiler/orm/functions/sum.py @@ -43,6 +43,15 @@ def _(element, compiler, **kw): return f"SUM(CAST({proc} AS NUMERIC))" +@compiles(SumFn, Dialects.MySQL) +def _(element, compiler, **kw): + """MySQL uses (UN)SIGNED INTEGER to cast to BIGINT + https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html + """ + proc = compiler.process(element.clauses, **kw) + return f"SUM(CAST({proc} AS UNSIGNED INTEGER))" + + @compiles(SumFn, Dialects.Snowflake) @compiles(SumFn, Dialects.Vertica) def _(element, compiler, **kw):