From 637baf72296872e1d08999995af453b55d803503 Mon Sep 17 00:00:00 2001 From: Dave Connors Date: Thu, 17 Aug 2023 08:27:08 -0500 Subject: [PATCH] update linker logic using 1.6, bump dependency --- dbt_meshify/dbt_projects.py | 6 +- poetry.lock | 201 ++++++++++++------ .../split_proj/models/metrics/metrics.yml | 60 ------ test-projects/split/split_proj/packages.yml | 2 - 4 files changed, 139 insertions(+), 130 deletions(-) delete mode 100644 test-projects/split/split_proj/models/metrics/metrics.yml diff --git a/dbt_meshify/dbt_projects.py b/dbt_meshify/dbt_projects.py index 7760280..4ba091c 100644 --- a/dbt_meshify/dbt_projects.py +++ b/dbt_meshify/dbt_projects.py @@ -67,12 +67,10 @@ def __init__( def _load_graph(manifest: Manifest) -> Graph: """Generate a dbt Graph using a project manifest and the internal dbt Compiler and Linker.""" - from dbt.compilation import Compiler, Linker + from dbt.compilation import Linker - compiler = Compiler(config={}) linker = Linker() - compiler.link_graph(linker=linker, manifest=manifest) - return Graph(linker.graph) + return linker.get_graph(manifest=manifest) @property def graph(self): diff --git a/poetry.lock b/poetry.lock index 3cafb8d..d61f824 100644 --- a/poetry.lock +++ b/poetry.lock @@ -320,55 +320,56 @@ files = [ [[package]] name = "dbt-core" -version = "1.5.1" +version = "1.6.0" description = "With dbt, data analysts and engineers can build analytics the way engineers build applications." category = "main" optional = false -python-versions = ">=3.7.2" +python-versions = ">=3.8" files = [ - {file = "dbt-core-1.5.1.tar.gz", hash = "sha256:d645ebdc1098ad0fad19f0871022d16ce77bec6b00d2b6b078db792c8917b8be"}, - {file = "dbt_core-1.5.1-py3-none-any.whl", hash = "sha256:abc685e4149d523e719b3a687705c2885f986e1ba0f984c048fb696c39ea8958"}, + {file = "dbt-core-1.6.0.tar.gz", hash = "sha256:51da239af02ed449562d3c5caea903edee7b5427c47efd5a6439634c59858087"}, + {file = "dbt_core-1.6.0-py3-none-any.whl", hash = "sha256:494018fef1254e6169f754c9ea32986d3851f1e5a8214d02f4e75fdd4a6c6c50"}, ] [package.dependencies] -agate = ">=1.6,<1.7.1" +agate = ">=1.7.0,<1.8.0" cffi = ">=1.9,<2.0.0" -click = ">=7.0,<9" -colorama = ">=0.3.9,<0.4.7" +click = "<9" +colorama = ">=0.3.9,<0.5" dbt-extractor = ">=0.4.1,<0.5.0" -hologram = ">=0.0.14,<=0.0.16" +dbt-semantic-interfaces = ">=0.2.0,<0.3.0" +hologram = ">=0.0.16,<0.1.0" idna = ">=2.5,<4" isodate = ">=0.6,<0.7" -Jinja2 = "3.1.2" +Jinja2 = ">=3.1.2,<3.2.0" logbook = ">=1.5,<1.6" -mashumaro = {version = "3.6", extras = ["msgpack"]} -minimal-snowplow-tracker = "0.0.2" -networkx = {version = ">=2.3,<3", markers = "python_version >= \"3.8\""} +mashumaro = {version = ">=3.8.1,<3.9.0", extras = ["msgpack"]} +minimal-snowplow-tracker = ">=0.0.2,<0.1.0" +networkx = ">=2.3,<4" packaging = ">20.9" pathspec = ">=0.9,<0.12" protobuf = ">=4.0.0" pytz = ">=2015.7" pyyaml = ">=6.0" requests = "<3.0.0" -sqlparse = ">=0.2.3,<0.4.4" +sqlparse = ">=0.2.3,<0.5" typing-extensions = ">=3.7.4" -werkzeug = ">=1,<3" +urllib3 = ">=1.0,<2.0" [[package]] name = "dbt-duckdb" -version = "1.5.1" +version = "1.6.0" description = "The duckdb adapter plugin for dbt (data build tool)" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.8" files = [ - {file = "dbt-duckdb-1.5.1.tar.gz", hash = "sha256:00bd9ed7338a9ec9d6a1c6f5f146447a89b07d46b7dd19c54d7f2f8150b43818"}, - {file = "dbt_duckdb-1.5.1-py3-none-any.whl", hash = "sha256:6204309b2bd343bbd3df0c8dc673c968c9f4fc373e4537687dabd11c54f941da"}, + {file = "dbt-duckdb-1.6.0.tar.gz", hash = "sha256:e36776d6ee7aa1554a236b7ffa93c556c4419920134a3801feef7c64b706db16"}, + {file = "dbt_duckdb-1.6.0-py3-none-any.whl", hash = "sha256:3fa094e077acbfbeb04c7b38dc3be2f6797f6fecd1323a1e3ce58e574ae22aa8"}, ] [package.dependencies] -dbt-core = ">=1.5.0,<1.6.0" -duckdb = ">=0.5.0" +dbt-core = ">=1.6.0,<1.7.0" +duckdb = ">=0.7.0" [package.extras] glue = ["boto3", "mypy-boto3-glue"] @@ -401,20 +402,44 @@ files = [ [[package]] name = "dbt-postgres" -version = "1.5.1" +version = "1.6.0" description = "The postgres adapter plugin for dbt (data build tool)" category = "main" optional = true -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "dbt-postgres-1.5.1.tar.gz", hash = "sha256:ac8df92e05fdaaa68ddbb99bec283e969bb8c6088679f22c4e75556ef6c85c14"}, - {file = "dbt_postgres-1.5.1-py3-none-any.whl", hash = "sha256:0065bedf27bbd22ef6a7423f6ab6341268afb38ab610d066f5892d61a8be08af"}, + {file = "dbt-postgres-1.6.0.tar.gz", hash = "sha256:ad9a464afe66114593011ef5edb8552467aa00352be169376f67e98444efc3c4"}, + {file = "dbt_postgres-1.6.0-py3-none-any.whl", hash = "sha256:ad6a5b81d65d4c14bb3b861e73f7543a20ca4cb0f1ddf1603e1a9b33463aafd6"}, ] [package.dependencies] -dbt-core = "1.5.1" +agate = "*" +dbt-core = "1.6.0" psycopg2-binary = ">=2.8,<3.0" +[[package]] +name = "dbt-semantic-interfaces" +version = "0.2.0" +description = "The shared semantic layer definitions that dbt-core and MetricFlow use" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "dbt_semantic_interfaces-0.2.0-py3-none-any.whl", hash = "sha256:823c9bd53745604cae2af854c7d5064056383d0304560c35236a33c5f0e52090"}, + {file = "dbt_semantic_interfaces-0.2.0.tar.gz", hash = "sha256:4afecc6dc56f85ecce7ac424dea07561513467e0bf28ead7307b78a22e6b999b"}, +] + +[package.dependencies] +click = ">=7.0,<9.0" +importlib-metadata = ">=6.0,<7.0" +jinja2 = ">=3.0,<4.0" +jsonschema = ">=3.0,<4.0" +more-itertools = ">=8.0,<9.0" +pydantic = ">=1.10,<2.0" +python-dateutil = ">=2.0,<3.0" +pyyaml = ">=6.0,<7.0" +typing-extensions = ">=4.0,<5.0" + [[package]] name = "distlib" version = "0.3.6" @@ -608,7 +633,7 @@ files = [ name = "importlib-metadata" version = "6.6.0" description = "Read metadata from Python packages" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -689,23 +714,25 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" -version = "4.17.3" +version = "3.2.0" description = "An implementation of JSON Schema validation for Python" category = "main" optional = false -python-versions = ">=3.7" +python-versions = "*" files = [ - {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, - {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, + {file = "jsonschema-3.2.0-py2.py3-none-any.whl", hash = "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163"}, + {file = "jsonschema-3.2.0.tar.gz", hash = "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"}, ] [package.dependencies] attrs = ">=17.4.0" -pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" +pyrsistent = ">=0.14.0" +setuptools = "*" +six = ">=1.11.0" [package.extras] -format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] +format = ["idna", "jsonpointer (>1.13)", "rfc3987", "strict-rfc3339", "webcolors"] +format-nongpl = ["idna", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "webcolors"] [[package]] name = "leather" @@ -851,14 +878,14 @@ files = [ [[package]] name = "mashumaro" -version = "3.6" +version = "3.8.1" description = "Fast serialization library on top of dataclasses" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "mashumaro-3.6-py3-none-any.whl", hash = "sha256:77403e3e2ecd0a7d0e22d472c08e33282460e48726eabe356c5163efbdf9c7ee"}, - {file = "mashumaro-3.6.tar.gz", hash = "sha256:ceb3de53029219bbbb0385ca600b59348dcd14e0c68523986c6d51889ad338f5"}, + {file = "mashumaro-3.8.1-py3-none-any.whl", hash = "sha256:e060469a4bec1c86f8145ea27ecd99027ea3e343075a4efcb5e8a969a45b9fb9"}, + {file = "mashumaro-3.8.1.tar.gz", hash = "sha256:8bae8b25e2287b75094655b8ba8635f34016c09ca16498188f2f3b198d88b7ef"}, ] [package.dependencies] @@ -1012,6 +1039,18 @@ files = [ {file = "mkdocs_material_extensions-1.1.1.tar.gz", hash = "sha256:9c003da71e2cc2493d910237448c672e00cefc800d3d6ae93d2fc69979e3bd93"}, ] +[[package]] +name = "more-itertools" +version = "8.14.0" +description = "More routines for operating on iterables, beyond itertools" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, + {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, +] + [[package]] name = "msgpack" version = "1.0.5" @@ -1387,6 +1426,59 @@ files = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] +[[package]] +name = "pydantic" +version = "1.10.12" +description = "Data validation and settings management using python type hints" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pydantic-1.10.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a1fcb59f2f355ec350073af41d927bf83a63b50e640f4dbaa01053a28b7a7718"}, + {file = "pydantic-1.10.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b7ccf02d7eb340b216ec33e53a3a629856afe1c6e0ef91d84a4e6f2fb2ca70fe"}, + {file = "pydantic-1.10.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fb2aa3ab3728d950bcc885a2e9eff6c8fc40bc0b7bb434e555c215491bcf48b"}, + {file = "pydantic-1.10.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:771735dc43cf8383959dc9b90aa281f0b6092321ca98677c5fb6125a6f56d58d"}, + {file = "pydantic-1.10.12-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ca48477862372ac3770969b9d75f1bf66131d386dba79506c46d75e6b48c1e09"}, + {file = "pydantic-1.10.12-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a5e7add47a5b5a40c49b3036d464e3c7802f8ae0d1e66035ea16aa5b7a3923ed"}, + {file = "pydantic-1.10.12-cp310-cp310-win_amd64.whl", hash = "sha256:e4129b528c6baa99a429f97ce733fff478ec955513630e61b49804b6cf9b224a"}, + {file = "pydantic-1.10.12-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b0d191db0f92dfcb1dec210ca244fdae5cbe918c6050b342d619c09d31eea0cc"}, + {file = "pydantic-1.10.12-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:795e34e6cc065f8f498c89b894a3c6da294a936ee71e644e4bd44de048af1405"}, + {file = "pydantic-1.10.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69328e15cfda2c392da4e713443c7dbffa1505bc9d566e71e55abe14c97ddc62"}, + {file = "pydantic-1.10.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2031de0967c279df0d8a1c72b4ffc411ecd06bac607a212892757db7462fc494"}, + {file = "pydantic-1.10.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ba5b2e6fe6ca2b7e013398bc7d7b170e21cce322d266ffcd57cca313e54fb246"}, + {file = "pydantic-1.10.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2a7bac939fa326db1ab741c9d7f44c565a1d1e80908b3797f7f81a4f86bc8d33"}, + {file = "pydantic-1.10.12-cp311-cp311-win_amd64.whl", hash = "sha256:87afda5539d5140cb8ba9e8b8c8865cb5b1463924d38490d73d3ccfd80896b3f"}, + {file = "pydantic-1.10.12-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:549a8e3d81df0a85226963611950b12d2d334f214436a19537b2efed61b7639a"}, + {file = "pydantic-1.10.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:598da88dfa127b666852bef6d0d796573a8cf5009ffd62104094a4fe39599565"}, + {file = "pydantic-1.10.12-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba5c4a8552bff16c61882db58544116d021d0b31ee7c66958d14cf386a5b5350"}, + {file = "pydantic-1.10.12-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c79e6a11a07da7374f46970410b41d5e266f7f38f6a17a9c4823db80dadf4303"}, + {file = "pydantic-1.10.12-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab26038b8375581dc832a63c948f261ae0aa21f1d34c1293469f135fa92972a5"}, + {file = "pydantic-1.10.12-cp37-cp37m-win_amd64.whl", hash = "sha256:e0a16d274b588767602b7646fa05af2782576a6cf1022f4ba74cbb4db66f6ca8"}, + {file = "pydantic-1.10.12-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6a9dfa722316f4acf4460afdf5d41d5246a80e249c7ff475c43a3a1e9d75cf62"}, + {file = "pydantic-1.10.12-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a73f489aebd0c2121ed974054cb2759af8a9f747de120acd2c3394cf84176ccb"}, + {file = "pydantic-1.10.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b30bcb8cbfccfcf02acb8f1a261143fab622831d9c0989707e0e659f77a18e0"}, + {file = "pydantic-1.10.12-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fcfb5296d7877af406ba1547dfde9943b1256d8928732267e2653c26938cd9c"}, + {file = "pydantic-1.10.12-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2f9a6fab5f82ada41d56b0602606a5506aab165ca54e52bc4545028382ef1c5d"}, + {file = "pydantic-1.10.12-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:dea7adcc33d5d105896401a1f37d56b47d443a2b2605ff8a969a0ed5543f7e33"}, + {file = "pydantic-1.10.12-cp38-cp38-win_amd64.whl", hash = "sha256:1eb2085c13bce1612da8537b2d90f549c8cbb05c67e8f22854e201bde5d98a47"}, + {file = "pydantic-1.10.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ef6c96b2baa2100ec91a4b428f80d8f28a3c9e53568219b6c298c1125572ebc6"}, + {file = "pydantic-1.10.12-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6c076be61cd0177a8433c0adcb03475baf4ee91edf5a4e550161ad57fc90f523"}, + {file = "pydantic-1.10.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d5a58feb9a39f481eda4d5ca220aa8b9d4f21a41274760b9bc66bfd72595b86"}, + {file = "pydantic-1.10.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5f805d2d5d0a41633651a73fa4ecdd0b3d7a49de4ec3fadf062fe16501ddbf1"}, + {file = "pydantic-1.10.12-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1289c180abd4bd4555bb927c42ee42abc3aee02b0fb2d1223fb7c6e5bef87dbe"}, + {file = "pydantic-1.10.12-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5d1197e462e0364906cbc19681605cb7c036f2475c899b6f296104ad42b9f5fb"}, + {file = "pydantic-1.10.12-cp39-cp39-win_amd64.whl", hash = "sha256:fdbdd1d630195689f325c9ef1a12900524dceb503b00a987663ff4f58669b93d"}, + {file = "pydantic-1.10.12-py3-none-any.whl", hash = "sha256:b749a43aa51e32839c9d71dc67eb1e4221bb04af1033a32e3923d46f9effa942"}, + {file = "pydantic-1.10.12.tar.gz", hash = "sha256:0fe8a415cea8f340e7a9af9c54fc71a649b43e8ca3cc732986116b3cb135d303"}, +] + +[package.dependencies] +typing-extensions = ">=4.2.0" + +[package.extras] +dotenv = ["python-dotenv (>=0.10.4)"] +email = ["email-validator (>=1.0.3)"] + [[package]] name = "pyflakes" version = "3.0.1" @@ -1802,7 +1894,7 @@ files = [ name = "setuptools" version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1889,21 +1981,20 @@ files = [ [[package]] name = "urllib3" -version = "2.0.3" +version = "1.26.16" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-2.0.3-py3-none-any.whl", hash = "sha256:48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1"}, - {file = "urllib3-2.0.3.tar.gz", hash = "sha256:bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825"}, + {file = "urllib3-1.26.16-py2.py3-none-any.whl", hash = "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f"}, + {file = "urllib3-1.26.16.tar.gz", hash = "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "verspec" @@ -1981,24 +2072,6 @@ files = [ [package.extras] watchmedo = ["PyYAML (>=3.10)"] -[[package]] -name = "werkzeug" -version = "2.3.5" -description = "The comprehensive WSGI web application library." -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "Werkzeug-2.3.5-py3-none-any.whl", hash = "sha256:26c6a6a63a8a8d10a8d4e13e7f10821772ff5f138909262e89e946717c72b857"}, - {file = "Werkzeug-2.3.5.tar.gz", hash = "sha256:f6426f626540009131f06482c73f10c536efd47125afc63c850cc950db9ae585"}, -] - -[package.dependencies] -MarkupSafe = ">=2.1.1" - -[package.extras] -watchdog = ["watchdog (>=2.3)"] - [[package]] name = "win32-setctime" version = "1.1.0" @@ -2018,7 +2091,7 @@ dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ diff --git a/test-projects/split/split_proj/models/metrics/metrics.yml b/test-projects/split/split_proj/models/metrics/metrics.yml deleted file mode 100644 index 0a9895f..0000000 --- a/test-projects/split/split_proj/models/metrics/metrics.yml +++ /dev/null @@ -1,60 +0,0 @@ -version: 2 - -metrics: - - name: revenue - label: Revenue - model: ref('orders') - description: "Income from all orders less tax" - - calculation_method: sum - expression: order_total - tax_paid - - timestamp: ordered_at - time_grains: [day, week, month, quarter, year] - - dimensions: - - location_name - - is_first_order - - - name: customers - label: Customers - model: ref('orders') - description: "Number of customers with a sale" - - calculation_method: count_distinct - expression: customer_id - - timestamp: ordered_at - time_grains: [day, week, month, quarter, year] - - dimensions: - - location_name - - - name: expenses - label: Expenses - model: ref('orders') - description: "Total expenses per order" - - calculation_method: sum - expression: order_cost - - timestamp: ordered_at - time_grains: [day, week, month, quarter, year] - - dimensions: - - location_name - - is_first_order - - - name: gross_profit - label: Gross Profit - description: "Revenue minus expenses" - - calculation_method: derived - expression: "{{ metric('revenue') }} - {{ metric('expenses') }}" - - timestamp: ordered_at - time_grains: [day, week, month, quarter, year] - - dimensions: - - location_name - - is_first_order diff --git a/test-projects/split/split_proj/packages.yml b/test-projects/split/split_proj/packages.yml index 18263eb..a86d7e6 100644 --- a/test-projects/split/split_proj/packages.yml +++ b/test-projects/split/split_proj/packages.yml @@ -1,5 +1,3 @@ packages: - - package: dbt-labs/metrics - version: 1.5.0 - package: dbt-labs/dbt_utils version: 1.0.0