amoghrajesh commented on code in PR #52497:
URL: https://github.com/apache/airflow/pull/52497#discussion_r2174931727


##########
providers/apache/cassandra/tests/system/apache/cassandra/example_cassandra_dag.py:
##########
@@ -45,9 +45,14 @@
     catchup=False,
     tags=["example"],
 ) as dag:
-    table_sensor = CassandraTableSensor(task_id="cassandra_table_sensor")
+    table_sensor = CassandraTableSensor(task_id="cassandra_table_sensor", 
table="<table_name>")
+
+    record_sensor = CassandraRecordSensor(
+        task_id="cassandra_record_sensor", keys={"p1": "v1", "p2": "v2"}, 
table="<table_name>"
+    )

Review Comment:
   With addition of the `table` field, will the dag be a functional one? Can i 
just run it?



##########
providers/apache/cassandra/tests/system/apache/cassandra/example_cassandra_dag.py:
##########
@@ -45,9 +45,14 @@
     catchup=False,
     tags=["example"],
 ) as dag:
-    table_sensor = CassandraTableSensor(task_id="cassandra_table_sensor")
+    table_sensor = CassandraTableSensor(task_id="cassandra_table_sensor", 
table="<table_name>")
+
+    record_sensor = CassandraRecordSensor(
+        task_id="cassandra_record_sensor", keys={"p1": "v1", "p2": "v2"}, 
table="<table_name>"
+    )
+
+    # Replace <table_name> with your actual table name

Review Comment:
   Lets move this to line 47?



##########
providers/apache/kylin/tests/system/apache/kylin/example_kylin_dag.py:
##########
@@ -49,37 +50,35 @@ def gen_build_time():
         return {"date_start": "1325347200000", "date_end": "1325433600000"}
 
     gen_build_time_task = gen_build_time()
-    gen_build_time_output_date_start = gen_build_time_task["date_start"]
-    gen_build_time_output_date_end = gen_build_time_task["date_end"]
 
     build_task1 = KylinCubeOperator(
         task_id="kylin_build_1",
         command="build",
-        start_time=gen_build_time_output_date_start,
-        end_time=gen_build_time_output_date_end,
+        start_time="{{ 
task_instance.xcom_pull(task_ids='gen_build_time')['date_start'] }}",
+        end_time="{{ 
task_instance.xcom_pull(task_ids='gen_build_time')['date_end'] }}",

Review Comment:
   I feel the older way was more readable..? WDYT



##########
providers/apache/kylin/tests/system/apache/kylin/example_kylin_dag.py:
##########
@@ -27,6 +27,7 @@
 
 from airflow import DAG
 from airflow.providers.apache.kylin.operators.kylin_cube import 
KylinCubeOperator
+from airflow.sdk import chain

Review Comment:
   Yeah we should have compat until we get rid of the double paths imo



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