Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Support dbt v1.1.0 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw authored May 2, 2022
1 parent e4ea53d commit ddef36a
Show file tree
Hide file tree
Showing 17 changed files with 27,500 additions and 31 deletions.
17 changes: 12 additions & 5 deletions dbt_artifacts_loader/api/rest_api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,23 @@ def is_available(artifact_type: ArtifactsTypes):
"""Check if the artifact type is available or not"""
available_artifact_types = [
# v1
ArtifactsTypes.CATALOG_V1, ArtifactsTypes.MANIFEST_V1,
ArtifactsTypes.RUN_RESULTS_V1, ArtifactsTypes.SOURCES_V1,
ArtifactsTypes.CATALOG_V1,
ArtifactsTypes.MANIFEST_V1,
ArtifactsTypes.RUN_RESULTS_V1,
ArtifactsTypes.SOURCES_V1,
# v2
ArtifactsTypes.RUN_RESULTS_V2, ArtifactsTypes.MANIFEST_V2,
ArtifactsTypes.RUN_RESULTS_V2,
ArtifactsTypes.MANIFEST_V2,
ArtifactsTypes.SOURCES_V2,
# v3
ArtifactsTypes.RUN_RESULTS_V3, ArtifactsTypes.MANIFEST_V3,
ArtifactsTypes.RUN_RESULTS_V3,
ArtifactsTypes.MANIFEST_V3,
ArtifactsTypes.SOURCES_V3,
# v4
ArtifactsTypes.RUN_RESULTS_V4, ArtifactsTypes.MANIFEST_V4,
ArtifactsTypes.RUN_RESULTS_V4,
ArtifactsTypes.MANIFEST_V4,
# v5
ArtifactsTypes.MANIFEST_V5,
]
if artifact_type in available_artifact_types:
return True
Expand Down
7 changes: 2 additions & 5 deletions dbt_artifacts_loader/dbt/base_bigquery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,8 @@ def adjust_union_value(property_value: Any, union_type, depth: int):
if TypingUtils.is_enum(outer_type_=type(property_value)):
property_value = property_value.value
return str(property_value)
# List[Union[List[str], str]]
elif all([x is List[str] or x is str] for x in nested_types):
# pylint: disable=C0123
if type(property_value) is str:
return [property_value]
# List[Union[List[str], str, None]]
elif all([x is None or x is List[str] or x is str] for x in nested_types):
return {"value": list(property_value)}
else:
raise ValueError(union_type)
Expand Down
16 changes: 16 additions & 0 deletions dbt_artifacts_loader/dbt/v5/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
Loading

0 comments on commit ddef36a

Please sign in to comment.