Lee-W commented on issue #44146:
URL: https://github.com/apache/airflow/issues/44146#issuecomment-4222503296

   ```python
     # 1. TaskFlow
     @task(outlets=[my_asset])
     def process(*, outlet_events):
         outlet_events[my_asset].partition_key = compute_partition_key()
   
     # 2. @asset
     @asset(schedule=CronPartitionTimetable("0 * * * *", timezone="UTC"))
     def my_asset(self):
         self.partition_key = compute_partition_key()
   
     # 3. @asset.multi
     @asset.multi(outlets=[asset_a, asset_b])
     def my_multi_asset(*, outlet_events):
         outlet_events[asset_a].partition_key = compute_partition_key()
   
     # 4. Traditional operator
     class MyOperator(BaseOperator):
         def execute(self, context):
             context["outlet_events"][my_asset].partition_key = 
compute_partition_key()
   ```
   
   We probably could have an interface like this? And we can have 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to