sqlmesh 0.188.2.dev17__py3-none-any.whl → 0.188.2.dev18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlmesh/_version.py +2 -2
- sqlmesh/core/console.py +1 -1
- sqlmesh/core/context.py +5 -1
- sqlmesh/core/dialect.py +2 -1
- sqlmesh/core/engine_adapter/_typing.py +1 -1
- sqlmesh/core/engine_adapter/base.py +15 -2
- sqlmesh/core/engine_adapter/bigquery.py +3 -1
- sqlmesh/core/engine_adapter/clickhouse.py +2 -1
- sqlmesh/core/engine_adapter/databricks.py +4 -1
- sqlmesh/core/engine_adapter/mssql.py +7 -2
- sqlmesh/core/engine_adapter/redshift.py +6 -1
- sqlmesh/core/engine_adapter/snowflake.py +6 -2
- sqlmesh/core/engine_adapter/spark.py +3 -1
- sqlmesh/core/engine_adapter/trino.py +4 -2
- sqlmesh/core/model/definition.py +2 -1
- sqlmesh/core/model/seed.py +5 -1
- sqlmesh/core/snapshot/evaluator.py +4 -1
- sqlmesh/core/state_sync/db/environment.py +7 -1
- sqlmesh/core/state_sync/db/interval.py +7 -1
- sqlmesh/core/state_sync/db/snapshot.py +6 -1
- sqlmesh/core/state_sync/db/version.py +2 -1
- sqlmesh/core/table_diff.py +18 -2
- sqlmesh/core/test/definition.py +13 -2
- sqlmesh/dbt/adapter.py +2 -1
- sqlmesh/dbt/util.py +5 -1
- sqlmesh/migrations/v0007_env_table_info_to_kind.py +2 -1
- sqlmesh/migrations/v0009_remove_pre_post_hooks.py +2 -1
- sqlmesh/migrations/v0011_add_model_kind_name.py +2 -1
- sqlmesh/migrations/v0012_update_jinja_expressions.py +2 -1
- sqlmesh/migrations/v0013_serde_using_model_dialects.py +2 -1
- sqlmesh/migrations/v0016_fix_windows_path.py +2 -1
- sqlmesh/migrations/v0017_fix_windows_seed_path.py +2 -1
- sqlmesh/migrations/v0018_rename_snapshot_model_to_node.py +2 -1
- sqlmesh/migrations/v0020_remove_redundant_attributes_from_dbt_models.py +2 -1
- sqlmesh/migrations/v0021_fix_table_properties.py +2 -1
- sqlmesh/migrations/v0022_move_project_to_model.py +2 -1
- sqlmesh/migrations/v0024_replace_model_kind_name_enum_with_value.py +2 -1
- sqlmesh/migrations/v0025_fix_intervals_and_missing_change_category.py +2 -1
- sqlmesh/migrations/v0026_remove_dialect_from_seed.py +2 -1
- sqlmesh/migrations/v0027_minute_interval_to_five.py +2 -1
- sqlmesh/migrations/v0029_generate_schema_types_using_dialect.py +2 -1
- sqlmesh/migrations/v0030_update_unrestorable_snapshots.py +2 -1
- sqlmesh/migrations/v0031_remove_dbt_target_fields.py +2 -1
- sqlmesh/migrations/v0034_add_default_catalog.py +2 -1
- sqlmesh/migrations/v0037_remove_dbt_is_incremental_macro.py +2 -1
- sqlmesh/migrations/v0038_add_expiration_ts_to_snapshot.py +2 -1
- sqlmesh/migrations/v0039_include_environment_in_plan_dag_spec.py +2 -1
- sqlmesh/migrations/v0041_remove_hash_raw_query_attribute.py +2 -1
- sqlmesh/migrations/v0042_trim_indirect_versions.py +2 -1
- sqlmesh/migrations/v0043_fix_remove_obsolete_attributes_in_plan_dags.py +2 -1
- sqlmesh/migrations/v0045_move_gateway_variable.py +2 -1
- sqlmesh/migrations/v0048_drop_indirect_versions.py +2 -1
- sqlmesh/migrations/v0051_rename_column_descriptions.py +2 -1
- sqlmesh/migrations/v0055_add_updated_ts_unpaused_ts_ttl_ms_unrestorable_to_snapshot.py +2 -1
- sqlmesh/migrations/v0060_move_audits_to_model.py +2 -1
- sqlmesh/migrations/v0063_change_signals.py +2 -1
- sqlmesh/migrations/v0064_join_when_matched_strings.py +2 -1
- sqlmesh/migrations/v0069_update_dev_table_suffix.py +2 -1
- sqlmesh/migrations/v0071_add_dev_version_to_intervals.py +4 -1
- sqlmesh/migrations/v0073_remove_symbolic_disable_restatement.py +2 -1
- sqlmesh/migrations/v0075_remove_validate_query.py +2 -1
- sqlmesh/migrations/v0081_update_partitioned_by.py +2 -1
- sqlmesh/utils/date.py +9 -2
- sqlmesh/utils/pandas.py +43 -33
- {sqlmesh-0.188.2.dev17.dist-info → sqlmesh-0.188.2.dev18.dist-info}/METADATA +1 -1
- {sqlmesh-0.188.2.dev17.dist-info → sqlmesh-0.188.2.dev18.dist-info}/RECORD +72 -72
- web/server/api/endpoints/commands.py +2 -1
- web/server/utils.py +3 -1
- {sqlmesh-0.188.2.dev17.dist-info → sqlmesh-0.188.2.dev18.dist-info}/WHEEL +0 -0
- {sqlmesh-0.188.2.dev17.dist-info → sqlmesh-0.188.2.dev18.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.188.2.dev17.dist-info → sqlmesh-0.188.2.dev18.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.188.2.dev17.dist-info → sqlmesh-0.188.2.dev18.dist-info}/top_level.txt +0 -0
sqlmesh/core/test/definition.py
CHANGED
|
@@ -11,9 +11,7 @@ from pathlib import Path
|
|
|
11
11
|
from unittest.mock import patch
|
|
12
12
|
|
|
13
13
|
import numpy as np
|
|
14
|
-
import pandas as pd
|
|
15
14
|
from io import StringIO
|
|
16
|
-
from pandas.api.types import is_object_dtype
|
|
17
15
|
from sqlglot import Dialect, exp
|
|
18
16
|
from sqlglot.optimizer.annotate_types import annotate_types
|
|
19
17
|
from sqlglot.optimizer.normalize_identifiers import normalize_identifiers
|
|
@@ -29,6 +27,8 @@ from sqlmesh.utils.errors import ConfigError, TestError
|
|
|
29
27
|
from sqlmesh.utils.yaml import load as yaml_load
|
|
30
28
|
|
|
31
29
|
if t.TYPE_CHECKING:
|
|
30
|
+
import pandas as pd
|
|
31
|
+
|
|
32
32
|
from sqlglot.dialects.dialect import DialectType
|
|
33
33
|
|
|
34
34
|
Row = t.Dict[str, t.Any]
|
|
@@ -207,6 +207,9 @@ class ModelTest(unittest.TestCase):
|
|
|
207
207
|
partial: t.Optional[bool] = False,
|
|
208
208
|
) -> None:
|
|
209
209
|
"""Compare two DataFrames"""
|
|
210
|
+
import pandas as pd
|
|
211
|
+
from pandas.api.types import is_object_dtype
|
|
212
|
+
|
|
210
213
|
if partial:
|
|
211
214
|
intersection = actual[actual.columns.intersection(expected.columns)]
|
|
212
215
|
if len(intersection.columns) > 0:
|
|
@@ -385,6 +388,8 @@ class ModelTest(unittest.TestCase):
|
|
|
385
388
|
partial: bool = False,
|
|
386
389
|
dialect: DialectType = None,
|
|
387
390
|
) -> t.Dict:
|
|
391
|
+
import pandas as pd
|
|
392
|
+
|
|
388
393
|
if not isinstance(values, dict):
|
|
389
394
|
values = {"rows": values}
|
|
390
395
|
|
|
@@ -557,6 +562,8 @@ class ModelTest(unittest.TestCase):
|
|
|
557
562
|
columns: t.Optional[t.Collection] = None,
|
|
558
563
|
partial: t.Optional[bool] = False,
|
|
559
564
|
) -> pd.DataFrame:
|
|
565
|
+
import pandas as pd
|
|
566
|
+
|
|
560
567
|
query = values.get("query")
|
|
561
568
|
if query:
|
|
562
569
|
if not partial:
|
|
@@ -725,6 +732,8 @@ class PythonModelTest(ModelTest):
|
|
|
725
732
|
|
|
726
733
|
def _execute_model(self) -> pd.DataFrame:
|
|
727
734
|
"""Executes the python model and returns a DataFrame."""
|
|
735
|
+
import pandas as pd
|
|
736
|
+
|
|
728
737
|
with self._concurrent_render_context():
|
|
729
738
|
variables = self.body.get("vars", {}).copy()
|
|
730
739
|
time_kwargs = {key: variables.pop(key) for key in TIME_KWARG_KEYS if key in variables}
|
|
@@ -893,6 +902,8 @@ def _raise_if_unexpected_columns(
|
|
|
893
902
|
|
|
894
903
|
def _row_difference(left: pd.DataFrame, right: pd.DataFrame) -> pd.DataFrame:
|
|
895
904
|
"""Returns all rows in `left` that don't appear in `right`."""
|
|
905
|
+
import pandas as pd
|
|
906
|
+
|
|
896
907
|
rows_missing_from_right = []
|
|
897
908
|
|
|
898
909
|
# `None` replaces `np.nan` because `np.nan != np.nan` and this would affect the mapping lookup
|
sqlmesh/dbt/adapter.py
CHANGED
|
@@ -4,7 +4,6 @@ import abc
|
|
|
4
4
|
import logging
|
|
5
5
|
import typing as t
|
|
6
6
|
|
|
7
|
-
import pandas as pd
|
|
8
7
|
from sqlglot import exp, parse_one
|
|
9
8
|
|
|
10
9
|
from sqlmesh.core.dialect import normalize_and_quote, normalize_model_name, schema_
|
|
@@ -15,6 +14,7 @@ from sqlmesh.utils.jinja import JinjaMacroRegistry
|
|
|
15
14
|
|
|
16
15
|
if t.TYPE_CHECKING:
|
|
17
16
|
import agate
|
|
17
|
+
import pandas as pd
|
|
18
18
|
from dbt.adapters.base import BaseRelation
|
|
19
19
|
from dbt.adapters.base.column import Column
|
|
20
20
|
from dbt.adapters.base.impl import AdapterResponse
|
|
@@ -324,6 +324,7 @@ class RuntimeAdapter(BaseAdapter):
|
|
|
324
324
|
def execute(
|
|
325
325
|
self, sql: str, auto_begin: bool = False, fetch: bool = False
|
|
326
326
|
) -> t.Tuple[AdapterResponse, agate.Table]:
|
|
327
|
+
import pandas as pd
|
|
327
328
|
from dbt.adapters.base.impl import AdapterResponse
|
|
328
329
|
|
|
329
330
|
from sqlmesh.dbt.util import pandas_to_agate, empty_table
|
sqlmesh/dbt/util.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import typing as t
|
|
2
4
|
|
|
3
5
|
import agate
|
|
4
|
-
import pandas as pd
|
|
5
6
|
from dbt.version import get_installed_version
|
|
6
7
|
|
|
8
|
+
if t.TYPE_CHECKING:
|
|
9
|
+
import pandas as pd
|
|
10
|
+
|
|
7
11
|
|
|
8
12
|
def _get_dbt_version() -> t.Tuple[int, int, int]:
|
|
9
13
|
dbt_version = get_installed_version()
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import zlib
|
|
5
5
|
|
|
6
|
-
import pandas as pd
|
|
7
6
|
from sqlglot import exp
|
|
8
7
|
|
|
9
8
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -14,6 +13,8 @@ def _hash(data): # type: ignore
|
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
16
|
+
import pandas as pd
|
|
17
|
+
|
|
17
18
|
engine_adapter = state_sync.engine_adapter
|
|
18
19
|
schema = state_sync.schema
|
|
19
20
|
environments_table = "_environments"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import typing as t
|
|
5
5
|
|
|
6
|
-
import pandas as pd
|
|
7
6
|
from sqlglot import exp
|
|
8
7
|
|
|
9
8
|
from sqlmesh.utils.jinja import has_jinja
|
|
@@ -11,6 +10,8 @@ from sqlmesh.utils.migration import index_text_type
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
13
|
+
import pandas as pd
|
|
14
|
+
|
|
14
15
|
engine_adapter = state_sync.engine_adapter
|
|
15
16
|
schema = state_sync.schema
|
|
16
17
|
snapshots_table = "_snapshots"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import typing as t
|
|
5
5
|
|
|
6
|
-
import pandas as pd
|
|
7
6
|
from sqlglot import exp, parse_one
|
|
8
7
|
|
|
9
8
|
from sqlmesh.utils.jinja import has_jinja
|
|
@@ -11,6 +10,8 @@ from sqlmesh.utils.migration import index_text_type
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
13
|
+
import pandas as pd
|
|
14
|
+
|
|
14
15
|
engine_adapter = state_sync.engine_adapter
|
|
15
16
|
schema = state_sync.schema
|
|
16
17
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.core import dialect as d
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import index_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import zlib
|
|
5
5
|
|
|
6
|
-
import pandas as pd
|
|
7
6
|
from sqlglot import exp
|
|
8
7
|
|
|
9
8
|
from sqlmesh.utils import random_id
|
|
@@ -12,6 +11,8 @@ from sqlmesh.utils.migration import index_text_type
|
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
14
|
+
import pandas as pd
|
|
15
|
+
|
|
15
16
|
engine_adapter = state_sync.engine_adapter
|
|
16
17
|
schema = state_sync.schema
|
|
17
18
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp, parse_one
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -4,13 +4,14 @@ import json
|
|
|
4
4
|
import typing as t
|
|
5
5
|
from collections import defaultdict
|
|
6
6
|
|
|
7
|
-
import pandas as pd
|
|
8
7
|
from sqlglot import exp
|
|
9
8
|
|
|
10
9
|
from sqlmesh.utils.migration import index_text_type
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def migrate(state_sync: t.Any, **kwargs: t.Any) -> None: # type: ignore
|
|
13
|
+
import pandas as pd
|
|
14
|
+
|
|
14
15
|
engine_adapter = state_sync.engine_adapter
|
|
15
16
|
schema = state_sync.schema
|
|
16
17
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -5,7 +5,6 @@ from __future__ import annotations
|
|
|
5
5
|
import json
|
|
6
6
|
import typing as t
|
|
7
7
|
|
|
8
|
-
import pandas as pd
|
|
9
8
|
from sqlglot import exp
|
|
10
9
|
from sqlglot.dialects.dialect import DialectType
|
|
11
10
|
from sqlglot.helper import dict_depth, seq_get
|
|
@@ -65,6 +64,8 @@ def update_dbt_relations(
|
|
|
65
64
|
|
|
66
65
|
|
|
67
66
|
def migrate(state_sync, default_catalog: t.Optional[str], **kwargs): # type: ignore
|
|
67
|
+
import pandas as pd
|
|
68
|
+
|
|
68
69
|
engine_adapter = state_sync.engine_adapter
|
|
69
70
|
schema = state_sync.schema
|
|
70
71
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.date import to_datetime, to_timestamp
|
|
@@ -11,6 +10,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
13
|
+
import pandas as pd
|
|
14
|
+
|
|
14
15
|
engine_adapter = state_sync.engine_adapter
|
|
15
16
|
schema = state_sync.schema
|
|
16
17
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
plan_dags_table = "_plan_dags"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
plan_dags_table = "_plan_dags"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import ast
|
|
4
4
|
import json
|
|
5
5
|
|
|
6
|
-
import pandas as pd
|
|
7
6
|
from sqlglot import exp
|
|
8
7
|
|
|
9
8
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -11,6 +10,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
13
|
+
import pandas as pd
|
|
14
|
+
|
|
14
15
|
engine_adapter = state_sync.engine_adapter
|
|
15
16
|
schema = state_sync.schema
|
|
16
17
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
@@ -10,6 +9,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
12
|
+
import pandas as pd
|
|
13
|
+
|
|
13
14
|
engine_adapter = state_sync.engine_adapter
|
|
14
15
|
schema = state_sync.schema
|
|
15
16
|
snapshots_table = "_snapshots"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.date import to_datetime, to_timestamp
|
|
@@ -11,6 +10,8 @@ from sqlmesh.utils.migration import blob_text_type
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
13
|
+
import pandas as pd
|
|
14
|
+
|
|
14
15
|
engine_adapter = state_sync.engine_adapter
|
|
15
16
|
schema = state_sync.schema
|
|
16
17
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp, parse_one
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type, blob_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type, blob_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
|
|
5
|
-
import pandas as pd
|
|
6
5
|
from sqlglot import exp
|
|
7
6
|
|
|
8
7
|
from sqlmesh.utils.migration import index_text_type, blob_text_type
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
def migrate(state_sync, **kwargs): # type: ignore
|
|
11
|
+
import pandas as pd
|
|
12
|
+
|
|
12
13
|
engine_adapter = state_sync.engine_adapter
|
|
13
14
|
schema = state_sync.schema
|
|
14
15
|
snapshots_table = "_snapshots"
|