You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using dlt.current.resource_state() to store a dictionary about processed entities. On first pipeline execution, I store a dict[int, int] mapping. On second pipeline execution, the deserialized state returns a dict[str, int] mapping. This causes issues when checking keys on the 2nd execution. The problem seems to be specific to the keys, since type is preserved for the values.
Reading the documentation section about supported types, this seems to be an unintended behavior. Could be listed as a caveat in the meantime.
Expected behavior
The serialization / deserialization of the pipeline state should properly preserve types.
Steps to reproduce
By running the following resource twice, the seen keys go from int to str after deserialization.
dlt version
1.4.1
Describe the problem
I am using
dlt.current.resource_state()
to store a dictionary about processed entities. On first pipeline execution, I store adict[int, int]
mapping. On second pipeline execution, the deserialized state returns adict[str, int]
mapping. This causes issues when checking keys on the 2nd execution. The problem seems to be specific to the keys, since type is preserved for the values.Reading the documentation section about supported types, this seems to be an unintended behavior. Could be listed as a caveat in the meantime.
Expected behavior
The serialization / deserialization of the pipeline state should properly preserve types.
Steps to reproduce
By running the following resource twice, the seen keys go from
int
tostr
after deserialization.Execution 1
Execution 2; Notice the keys
"1"
and1
Operating system
Linux
Runtime environment
Local
Python version
3.11
dlt data source
No response
dlt destination
DuckDB
Other deployment details
No response
Additional information
This could be backend-dependent.
The text was updated successfully, but these errors were encountered: