Brent Shulman
02/19/2024, 6:24 PMScout
02/19/2024, 6:24 PMAssetSelection
objects using operators like |
(union), &
(intersection), and -
(difference). Here's an example from the documentation on how to use the union operator: python remit_professional_pipeline = define_asset_job( name="Remit_Professional_Build", selection=( remit_professional_asset_selector | remit_professional_end_table_selector ), )
However, this example assumes that the assets being combined are compatible in terms of their partitioning schemes or that they do not require partitioning alignment. If the assets have different partition definitions, combining them directly may not be straightforward because each partition represents a different slice of data, and the union operation may not make sense across different partitioning schemes. If you need to combine assets with different partition definitions, you might need to consider transforming one or both assets to align their partitioning schemes or to remove partitioning from one of them, depending on your use case. This could involve creating a new asset that represents the union of the data from both original assets, with a partitioning scheme that makes sense for the combined data. The documentation does not provide a direct example of how to union assets with different partition definitions, as this is a more complex scenario that would depend on the specific nature of the partitions and the intended use of the combined data. If you need further guidance on how to handle this specific use case, you may want to consult the Dagster community or explore more advanced features of the platform that could help in aligning partition definitions.