diff --git a/.gitignore b/.gitignore index a9bbe77cba9..2cfed2b7f15 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ __pycache__/ # Distribution / packaging .Python +.venv/ env*/ dbt_env/ build/ diff --git a/core/dbt/parser/manifest.py b/core/dbt/parser/manifest.py index a0cc49faa20..017ba02e678 100644 --- a/core/dbt/parser/manifest.py +++ b/core/dbt/parser/manifest.py @@ -19,6 +19,8 @@ from itertools import chain import time +import agate + from dbt.context.manifest import generate_query_header_context from dbt.contracts.graph.semantic_manifest import SemanticManifest from dbt_common.events.base_types import EventLevel @@ -157,12 +159,17 @@ def extended_msgpack_encoder(obj): elif type(obj) is datetime.datetime: datetime_bytes = msgpack.ExtType(2, obj.isoformat().encode()) return datetime_bytes + elif isinstance(obj, agate.Table): + agate_bytes = msgpack.ExtType(3, "".encode()) + return agate_bytes return obj def extended_mashumuro_decoder(data): - return msgpack.unpackb(data, ext_hook=extended_msgpack_decoder, raw=False) + return msgpack.unpackb( + data, ext_hook=extended_msgpack_decoder, raw=False, strict_map_key=False + ) def extended_msgpack_decoder(code, data): @@ -172,6 +179,8 @@ def extended_msgpack_decoder(code, data): elif code == 2: dt = datetime.datetime.fromisoformat(data.decode()) return dt + elif code == 3: + return "" else: return msgpack.ExtType(code, data)