josh-fell commented on a change in pull request #16869:
URL: https://github.com/apache/airflow/pull/16869#discussion_r674218931
##########
File path: airflow/providers/apache/kylin/example_dags/example_kylin_dag.py
##########
@@ -57,8 +52,8 @@ def gen_build_time(**kwargs):
project='learn_kylin',
cube='kylin_sales_cube',
command='build',
- start_time="{{
task_instance.xcom_pull(task_ids='gen_build_time',key='date_start') }}",
- end_time="{{
task_instance.xcom_pull(task_ids='gen_build_time',key='date_end') }}",
+ start_time=gen_build_time_task.output['date_start'],
+ end_time=gen_build_time_task.output['date_end'],
Review comment:
Not specifically with Kylin since I don't have a Kylin integration handy
but this test functions as expected:
```python
def gen_build_time(**kwargs):
"""
Gen build time and push to xcom
:param kwargs:
:return:
"""
ti = kwargs["ti"]
ti.xcom_push(key="date_start", value="1325347200000")
ti.xcom_push(key="date_end", value="1325433600000")
def print_stuff(date_start, date_end):
print(date_start)
print(date_end)
dag = DAG("mwe", start_date=days_ago(14))
with dag:
op = PythonOperator(task_id="gen_build_time",
python_callable=gen_build_time)
op2 = PythonOperator(
task_id="print_stuff",
python_callable=print_stuff,
op_kwargs={"date_start": op.output["date_start"], "date_end":
op.output["date_end"]},
)
```

--
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]