Manan P
02/01/2023, 1:57 AMfrom dagster import Definitions, asset, MultiPartitionsDefinition, StaticPartitionsDefinition
# Asset for external tables
@asset(
partitions_def=MultiPartitionsDefinition({
"customer_code": StaticPartitionsDefinition(['abc','youi']),
"datasource_name": StaticPartitionsDefinition(['tv','search']),
})
)
def external_table(context):
parition_keys = <http://context.log.info|context.log.info>(context.partition_key.keys_by_dimension)
return_val = f"materialized external table for {parition_keys=}"
<http://context.log.info|context.log.info>(return_val)
return return_val
defs = Definitions(
assets= [external_table]
)
Error message:
dagster._core.errors.DagsterExecutionHandleOutputError: Error occurred while handling output "result" of step "external_table":
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_plan.py", line 266, in dagster_event_sequence_for_step
for step_event in check.generator(step_events):
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 394, in core_dagster_event_sequence_for_step
for evt in _type_check_and_store_output(step_context, user_event, input_lineage):
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 451, in _type_check_and_store_output
for evt in _store_output(step_context, step_output_handle, output, input_lineage):
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 636, in _store_output
for elt in iterate_with_context(
File "C:\Python310\lib\site-packages\dagster\_utils\__init__.py", line 456, in iterate_with_context
with context_fn():
File "C:\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\utils.py", line 86, in op_execution_error_boundary
raise error_cls(
The above exception was caused by the following exception:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\manan patel\\OneDrive - Altis Consulting P L\\Documents\\Projects\\Clients\\2022\\Mutinex\\repo\\monorepo\\dagster\\tmpx_pk7u1y\\storage\\external_table\\abc|tv'
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\utils.py", line 56, in op_execution_error_boundary
yield
File "C:\Python310\lib\site-packages\dagster\_utils\__init__.py", line 458, in iterate_with_context
next_output = next(iterator)
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 626, in _gen_fn
gen_output = output_manager.handle_output(output_context, output.value)
File "C:\Python310\lib\site-packages\dagster\_core\storage\upath_io_manager.py", line 231, in handle_output
self.dump_to_path(context=context, obj=obj, path=path)
File "C:\Python310\lib\site-packages\dagster\_core\storage\fs_io_manager.py", line 148, in dump_to_path
with path.open("wb") as file:
File "C:\Python310\lib\pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
jamie
02/01/2023, 4:37 PMC:\\Users\\manan patel\\OneDrive - Altis Consulting P L\\Documents\\Projects\\Clients\\2022\\Mutinex\\repo\\monorepo\\dagster\\tmpx_pk7u1y\\storage\\external_table\\
is valid on your computer?Manan P
02/01/2023, 11:17 PMC:\\Users\\manan patel\\OneDrive - Altis Consulting P L\\Documents\\Projects\\Clients\\2022\\Mutinex\\repo\\monorepo\\dagster\\
.
A similar error occurs:
dagster._core.errors.DagsterExecutionHandleOutputError: Error occurred while handling output "result" of step "external_table":
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_plan.py", line 266, in dagster_event_sequence_for_step
for step_event in check.generator(step_events):
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 394, in core_dagster_event_sequence_for_step
for evt in _type_check_and_store_output(step_context, user_event, input_lineage):
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 451, in _type_check_and_store_output
for evt in _store_output(step_context, step_output_handle, output, input_lineage):
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 636, in _store_output
for elt in iterate_with_context(
File "C:\Python310\lib\site-packages\dagster\_utils\__init__.py", line 456, in iterate_with_context
with context_fn():
File "C:\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\utils.py", line 86, in op_execution_error_boundary
raise error_cls(
The above exception was caused by the following exception:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\manan patel\\OneDrive - Altis Consulting P L\\Documents\\Projects\\Clients\\2022\\Mutinex\\repo\\monorepo\\dagster\\storage\\external_table\\abc|tv'
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\utils.py", line 56, in op_execution_error_boundary
yield
File "C:\Python310\lib\site-packages\dagster\_utils\__init__.py", line 458, in iterate_with_context
next_output = next(iterator)
File "C:\Python310\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 626, in _gen_fn
gen_output = output_manager.handle_output(output_context, output.value)
File "C:\Python310\lib\site-packages\dagster\_core\storage\upath_io_manager.py", line 231, in handle_output
self.dump_to_path(context=context, obj=obj, path=path)
File "C:\Python310\lib\site-packages\dagster\_core\storage\fs_io_manager.py", line 148, in dump_to_path
with path.open("wb") as file:
File "C:\Python310\lib\pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
However, I can now confirm that the path C:\\Users\\manan patel\\OneDrive - Altis Consulting P L\\Documents\\Projects\\Clients\\2022\\Mutinex\\repo\\monorepo\\dagster\\storage\\external_table\\
exists.Ahmed Slaoui
02/09/2023, 12:33 PMdagster._core.errors.DagsterExecutionHandleOutputError: Error occurred while handling output "result" of step "multi_partitions_asset":
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\execute_plan.py", line 265, in dagster_event_sequence_for_step
for step_event in check.generator(step_events):
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 388, in core_dagster_event_sequence_for_step
for evt in _type_check_and_store_output(step_context, user_event, input_lineage):
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 444, in _type_check_and_store_output
for evt in _store_output(step_context, step_output_handle, output, input_lineage):
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 631, in _store_output
for elt in iterate_with_context(
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_utils\__init__.py", line 467, in iterate_with_context
with context_fn():
File "D:\Python\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\utils.py", line 85, in op_execution_error_boundary
raise error_cls(
The above exception was caused by the following exception:
OSError: [Errno 22] Invalid argument: 'D:\\Documents\\Projets\\tasks-runner\\dagster_home\\storage\\multi_partitions_asset\\red|2023-02-08'
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\utils.py", line 55, in op_execution_error_boundary
yield
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_utils\__init__.py", line 469, in iterate_with_context
next_output = next(iterator)
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\execution\plan\execute_step.py", line 621, in _gen_fn
gen_output = output_manager.handle_output(output_context, output.value)
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\storage\upath_io_manager.py", line 226, in handle_output
self.dump_to_path(context=context, obj=obj, path=path)
File "D:\Documents\Projets\tasks-runner\venv\lib\site-packages\dagster\_core\storage\fs_io_manager.py", line 148, in dump_to_path
with path.open("wb") as file:
File "D:\Python\Python310\lib\pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
Any update on this ?jamie
02/09/2023, 4:10 PMclaire
02/09/2023, 4:24 PMManan P
02/09/2023, 11:28 PMclaire
02/09/2023, 11:29 PMAhmed Slaoui
02/10/2023, 11:01 AM