https://dagster.io/ logo
#ask-community
Title
# ask-community
b

Brittany Kozura

07/13/2023, 12:24 PM
Good morning When I try to run an asset materialization with mutlipartitions (one monthly, one static). I am running into this unexpected error:
Copy code
sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) Failed processing pyformat-parameters; Python 'multipartitionkey' cannot be converted to a MySQL type
[SQL: INSERT INTO event_logs (run_id, event, dagster_event_type, timestamp, step_key, asset_key, `partition`) VALUES (%(run_id)s, %(event)s, %(dagster_event_type)s, %(timestamp)s, %(step_key)s, %(asset_key)s, %(partition)s)]
[parameters: {'run_id': '12f57e6a-3d07-462f-a332-6fa82d652df9', 'event': '{"__class__": "EventLogEntry", "dagster_event": {"__class__": "DagsterEvent", "event_specific_data": {"__class__": "StepMaterializationData", "asset_ ... (2101 characters truncated) ... -a332-6fa82d652df9", "step_key": "srids_from_requester", "timestamp": 1689229999.6538389, "user_message": "Materialized value srids_from_requester."}', 'dagster_event_type': 'ASSET_MATERIALIZATION', 'timestamp': datetime.datetime(2023, 7, 13, 6, 33, 19, 653839), 'step_key': 'srids_from_requester', 'asset_key': '["srids_from_requester"]', 'partition': 'tiktok_data_export|2022-01-01'}]
(Background on this error at: <https://sqlalche.me/e/20/f405>)
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_plan.py", line 273, in dagster_event_sequence_for_step
    for step_event in check.generator(step_events):
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_step.py", line 375, in core_dagster_event_sequence_for_step
    for evt in _type_check_and_store_output(step_context, user_event):
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_step.py", line 428, in _type_check_and_store_output
    for evt in _store_output(step_context, step_output_handle, output):
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/execution/plan/execute_step.py", line 673, in _store_output
    yield DagsterEvent.asset_materialization(step_context, materialization)
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/events/__init__.py", line 895, in asset_materialization
    return DagsterEvent.from_step(
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/events/__init__.py", line 413, in from_step
    log_step_event(step_context, event)
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/events/__init__.py", line 292, in log_step_event
    step_context.log.log_dagster_event(
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/log_manager.py", line 409, in log_dagster_event
    self.log(level=level, msg=msg, extra={DAGSTER_META_KEY: dagster_event})
  File "/opt/measure/env/measure-analytics/lib/python3.10/site-packages/dagster/_core/log_manager.py", line 424, in log
    self._log(level, msg, args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1624, in _log
This happens on both the dev and prod envs. It does not happen on my local environment.
c

claire

07/13/2023, 11:02 PM
Hi Brittany. I commented on the issue you filed here--https://github.com/dagster-io/dagster/issues/15273