Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "upgrade dbt-bigquery and re-generate artifact types" #2570

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion warehouse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ RUN poetry export -f requirements.txt --without-hashes --output requirements.txt

COPY ./dbt_project.yml /app/dbt_project.yml
COPY ./packages.yml /app/packages.yml
COPY ./profiles.yml /app/profiles.yml
RUN dbt deps

COPY . /app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ models:
For best results, join with reference to a specific date, and make sure to choose a specific
output grain (organizations, services, customer-facing vs. not); you will likely need to filter
or group to get the desired output.
tests:
columns:
- *key
- name: service_key
Expand Down
3 changes: 0 additions & 3 deletions warehouse/mypy.ini

This file was deleted.

200 changes: 148 additions & 52 deletions warehouse/poetry.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions warehouse/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ networkx = {version = "<3", extras = ["default"]}
# export CFLAGS="-I $(brew --prefix graphviz)/include"
# export LDFLAGS="-L $(brew --prefix graphviz)/lib"
pygraphviz = "^1.10"
dbt-bigquery = "^1.4.3"
palettable = "^3.3.0"
dbt-bigquery = "^1.5.0"

[tool.poetry.group.dev.dependencies]
black = "^22.12.0"
mypy = "^0.991"
isort = "^5.11.4"
types-tqdm = "^4.64.7"
types-requests = "^2.28.11"
Expand All @@ -45,8 +46,10 @@ datamodel-code-generator = "^0.17.1"
sqlfluff = "^2.0.2"
sqlfluff-templater-dbt = "^2.0.2"
ipdb = "^0.13.13"
mypy = "^1.2.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.mypy]
plugins = "sqlmypy"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: https://schemas.getdbt.com/dbt/catalog/v1.json
# timestamp: 2023-05-02T16:20:16+00:00
# filename: v1.json
# timestamp: 2023-03-06T19:42:51+00:00

from __future__ import annotations

Expand All @@ -16,7 +16,7 @@ class Config:

dbt_schema_version: Optional[str] = "https://schemas.getdbt.com/dbt/catalog/v1.json"
dbt_version: Optional[str] = "0.20.0rc1"
generated_at: Optional[datetime] = "2021-06-07T14:49:01.098234Z"
generated_at: Optional[datetime] = "2021-06-07T14:49:01.098234Z" # type: ignore
invocation_id: Optional[str] = None
env: Optional[Dict[str, str]] = {}

Expand Down Expand Up @@ -63,8 +63,20 @@ class Config:
stats: Dict[str, StatsItem]
unique_id: Optional[str] = None

@property
def num_bytes(self) -> Optional[int]:
if "num_bytes" in self.stats:
value = self.stats["num_bytes"].value
# for some reason, 0 gets parsed as bool by pydantic
# maybe because it's first in the union?
if isinstance(value, bool):
return 0
assert isinstance(value, (float, str))
return int(float(value))
return None

class Model(BaseModel):

class Catalog(BaseModel):
class Config:
extra = Extra.forbid

Expand Down
Loading