Nicolas Luchetti
04/19/2023, 4:25 PMTypeError: '>' not supported between instances of 'str' and 'int'
Nicolas Luchetti
04/19/2023, 4:27 PM# Instantiate a Google Cloud Storage client and specify required bucket and file
storage_client = storage.Client()
bucket = storage_client.get_bucket('dagster-dbt')
blob = bucket.blob('manifest/manifest.json','r')
# Download the contents of the blob as a string and then parse it using json.loads() method
manifest = json.loads(blob.download_as_string(client=None))
dbt_assets = load_assets_from_dbt_manifest(
manifest,
key_prefix=None,
)
defs = Definitions(
assets=dbt_assets,
)
this is how i'm loading the manifestowen
04/19/2023, 4:37 PMNicolas Luchetti
04/19/2023, 4:40 PMowen
04/19/2023, 4:41 PMTypeError: '>' not supported between instances of 'str' and 'int'
is being thrown fromNicolas Luchetti
04/19/2023, 4:44 PMTypeError: '>' not supported between instances of 'str' and 'int'
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/dagster/_grpc/server.py", line 267, in __init__
self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories(
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/dagster/_grpc/server.py", line 116, in __init__
loadable_targets = get_loadable_targets(
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/dagster/_grpc/utils.py", line 47, in get_loadable_targets
else loadable_targets_from_python_module(module_name, working_directory)
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/dagster/_core/workspace/autodiscovery.py", line 36, in loadable_targets_from_python_module
module = load_python_module(
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/dagster/_core/code_pointer.py", line 138, in load_python_module
return importlib.import_module(module_name)
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/nicolas.luchetti/Repos/datateam-dagster-ochestrator-jobs/datacrowd_orchestrator/datacrowd_orchestrator_dagster_dbt/__init__.py", line 4, in <module>
from .assets import *
File "/Users/nicolas.luchetti/Repos/datateam-dagster-ochestrator-jobs/datacrowd_orchestrator/datacrowd_orchestrator_dagster_dbt/assets/__init__.py", line 31, in <module>
blob = bucket.blob('manifest/manifest.json','r')
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/google/cloud/storage/bucket.py", line 795, in blob
return Blob(
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/google/cloud/storage/blob.py", line 219, in __init__
self.chunk_size = chunk_size # Check that setter accepts value.
File "/Users/nicolas.luchetti/.pyenv/versions/3.10.4/lib/python3.10/site-packages/google/cloud/storage/blob.py", line 262, in chunk_size
if value is not None and value > 0 and value % self._CHUNK_SIZE_MULTIPLE != 0:
owen
04/19/2023, 5:31 PMowen
04/19/2023, 5:32 PMowen
04/19/2023, 5:32 PMowen
04/19/2023, 5:35 PMNicolas Luchetti
04/19/2023, 5:54 PMNicolas Luchetti
04/19/2023, 5:54 PMNicolas Luchetti
04/21/2023, 12:43 PMfor source in manifest["sources"]:
manifest["sources"][source]["unique_id"] = manifest["sources"][source][
"unique_id"
].replace("-", "_")
Nicolas Luchetti
04/21/2023, 12:44 PMNicolas Luchetti
04/21/2023, 12:46 PMowen
04/21/2023, 9:31 PMowen
04/21/2023, 9:31 PM