Skip to content

Commit

Permalink
✨ support for expanding bigquery record columns
Browse files Browse the repository at this point in the history
  • Loading branch information
z3z1ma committed Mar 27, 2023
1 parent dcf2465 commit 25e5e38
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changes/0.11.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.11.6 - 2023-03-26
### Fixed
* Support for bigquery record columns
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).


## 0.11.6 - 2023-03-26
### Fixed
* Support for bigquery record columns

### Changed
* Backlog of updates [here](https://github.com/z3z1ma/dbt-osmosis/compare/v0.7.6...0.11.5), changelog automations are in progress in tandem with a dedicated documentation website.

## 0.6.4 - 2022-08-12
### Changed
* --pk is not longer required for diff command as we will use a hash of all columns as a fallback
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dbt-osmosis"
version = "0.11.5"
version = "0.11.6"
description = "A dbt server and suite of optional developer tools to make developing with dbt delightful."
authors = ["z3z1ma <[email protected]>"]
license = "Apache 2.0"
Expand Down
14 changes: 10 additions & 4 deletions src/dbt_osmosis/core/osmosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def get_columns(self, node: ManifestNode) -> List[str]:
return columns
try:
columns = [
self.column_casing(c.name) for c in self.adapter.get_columns_in_relation(table)
self.column_casing(exp.name)
for c in self.adapter.get_columns_in_relation(table)
for exp in getattr(c, "flatten", lambda: [c])()
]
except Exception as error:
logger().info(
Expand Down Expand Up @@ -324,14 +326,18 @@ def bootstrap_sources(self) -> None:
"description": "",
"columns": [
{
"name": self.column_casing(column.name),
"description": getattr(column, "description", ""),
"name": self.column_casing(exp.name),
"description": getattr(
exp, "description", getattr(c, "description", "")
),
}
for column in self.adapter.get_columns_in_relation(relation)
for c in self.adapter.get_columns_in_relation(relation)
for exp in getattr(c, "flatten", lambda: [c])()
],
}
for relation in relations
]
osmosis_schema_path.parent.mkdir(parents=True, exist_ok=True)
with open(osmosis_schema_path, "w") as schema_file:
logger().info(
":syringe: Injecting source %s into dbt project",
Expand Down

0 comments on commit 25e5e38

Please sign in to comment.