Hi there, I have encountered some strange error wh...
# ask-community
j
Hi there, I have encountered some strange error when using multiple partition, one is dynamic and the other daily, trying to land the data into DuckDBPandasIOManager. Is this error expected or just db_io_manager instance can not use dynamic partitions or multiple partitions?
Copy code
AttributeError: 'str' object has no attribute 'get'

Stack Trace:
  File "python/dagster/venv/lib/python3.9/site-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
    yield
  File "python/dagster/venv/lib/python3.9/site-packages/dagster/_utils/__init__.py", line 445, in iterate_with_context
    next_output = next(iterator)
  File "python/dagster/venv/lib/python3.9/site-packages/dagster/_core/execution/plan/execute_step.py", line 593, in _gen_fn
    gen_output = output_manager.handle_output(output_context, output.value)
  File "python/dagster/venv/lib/python3.9/site-packages/dagster/_core/storage/db_io_manager.py", line 127, in handle_output
    table_slice = self._get_table_slice(context, context)
  File "python/dagster/venv/lib/python3.9/site-packages/dagster/_core/storage/db_io_manager.py", line 217, in _get_table_slice
    partition_expr_str = cast(Mapping[str, str], partition_expr).get(part.name)
o
hi @James Lam! you should be able to use this IOManager with multi-dimensional partitions. in this case, it looks like the
partition_expr
set on your metadata for your asset is just a single string, rather than a dictionary mapping partition dimension name to string.
j
I see thank you for clarifying that, as mentioned it seems I just misused it instead.