Ismael Rodrigues
03/01/2024, 5:20 PMScout
03/01/2024, 5:20 PMMultiToSingleDimensionPartitionMapping
to map the multi-dimensional partitions to the single dimension that they share. In your code, you have defined my_asset_1
with a multi_partitions_def
which partitions by both "entity" and "date". You then have my_multi_asset_2
which is intended to depend only on the "date" dimension of my_asset_1
. To achieve this, you've correctly used MultiToSingleDimensionPartitionMapping("date")
in the AssetIn
definition for my_multi_asset_2
. However, you've mentioned that the auto materialization is still waiting for the main asset to materialize without the dimensions it has. This could be due to a few reasons: 1. The MultiToSingleDimensionPartitionMapping
may not be set up correctly or there might be an issue with how the dependencies are being resolved. 2. There could be a bug or limitation in the version of Dagster you are using that is preventing the expected behavior. 3. The materialization logic itself might not be triggering as expected due to other reasons not directly related to the partition mapping. To troubleshoot this issue, you can: - Ensure that the MultiToSingleDimensionPartitionMapping
is being used correctly as per the documentation. - Check if there are any known issues or updates in the Dagster GitHub repository that might address this problem. - Review the materialization and execution logs to see if there are any clues as to why the dependencies are not being resolved as expected. - Make sure that the my_asset_1
is being materialized correctly with the expected partition keys. If after reviewing these steps the issue persists, it might be beneficial to look for similar cases in the Dagster GitHub Issues or Discussions, or consider reaching out to the Dagster community for further assistance. Remember that the documentation provides guidance on how to use these features, but if there's a discrepancy between the expected behavior and what you're experiencing, it may require a deeper investigation into the specific details of your Dagster setup and the code you're running.