Skip to content

Commit

Permalink
Made DDL configuration consistent with views. Removed Lifecycle from …
Browse files Browse the repository at this point in the history
…Snowflake tables
  • Loading branch information
IceS2 committed Aug 16, 2024
1 parent 2cd5ebe commit 53bf75a
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ingestion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ARG INGESTION_DEPENDENCY="all"
ENV PIP_NO_CACHE_DIR=1
# Make pip silent
ENV PIP_QUIET=1
ARG RI_VERSION="1.4.7.1"
ARG RI_VERSION="1.4.7.2"
RUN pip install --upgrade pip
RUN pip install "openmetadata-managed-apis~=${RI_VERSION}" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.7.3/constraints-3.10.txt"
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion ingestion/operators/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ENV PIP_QUIET=1
RUN pip install --upgrade pip

ARG INGESTION_DEPENDENCY="all"
ARG RI_VERSION="1.4.7.1"
ARG RI_VERSION="1.4.7.2"
RUN pip install --upgrade pip
RUN pip install "openmetadata-ingestion[airflow]~=${RI_VERSION}"
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion ingestion/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
# since it helps us organize and isolate version management
[project]
name = "openmetadata-ingestion"
version = "1.4.7.1"
version = "1.4.7.2"
dynamic = ["readme", "dependencies", "optional-dependencies"]
authors = [
{name = "OpenMetadata Committers"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ def get_schema_definition(
"""
try:
schema_definition = None
if table_type in (TableType.View, TableType.MaterializedView):
if (
table_type in (TableType.View, TableType.MaterializedView)
and self.source_config.includeDDL
):
schema_definition = inspector.get_view_definition(
table_name, schema_name
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def get_view_definition(
)
return None


@reflection.cache
def get_table_names(
self, connection, schema=None, **kw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
from metadata.ingestion.source.database.incremental_metadata_extraction import (
IncrementalConfig,
)
from metadata.ingestion.source.database.life_cycle_query_mixin import (
LifeCycleQueryMixin,
)
from metadata.ingestion.source.database.multi_db_source import MultiDBSource
from metadata.ingestion.source.database.snowflake.models import (
STORED_PROC_LANGUAGE_MAP,
Expand All @@ -81,7 +78,6 @@
SNOWFLAKE_GET_SCHEMA_COMMENTS,
SNOWFLAKE_GET_STORED_PROCEDURE_QUERIES,
SNOWFLAKE_GET_STORED_PROCEDURES,
SNOWFLAKE_LIFE_CYCLE_QUERY,
SNOWFLAKE_SESSION_TAG_QUERY,
)
from metadata.ingestion.source.database.snowflake.utils import (
Expand Down Expand Up @@ -144,7 +140,6 @@


class SnowflakeSource(
LifeCycleQueryMixin,
StoredProcedureMixin,
ExternalTableLineageMixin,
CommonDbSourceService,
Expand All @@ -170,7 +165,6 @@ def __init__(

self._account: Optional[str] = None
self._org_name: Optional[str] = None
self.life_cycle_query = SNOWFLAKE_LIFE_CYCLE_QUERY
self.context.get_global().deleted_tables = []
self.pipeline_name = pipeline_name
self.incremental = incremental_configuration
Expand Down
4 changes: 2 additions & 2 deletions openmetadata-airflow-apis/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
# since it helps us organize and isolate version management
[project]
name = "openmetadata_managed_apis"
version = "1.4.7.1"
version = "1.4.7.2"
readme = "README.md"
authors = [
{name = "OpenMetadata Committers"}
Expand Down Expand Up @@ -60,4 +60,4 @@ omit = [
"tests/*",
"views/**",
"plugin.py"
]
]

0 comments on commit 53bf75a

Please sign in to comment.