You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for an example that combines the new taskflow annotation based task declarations with, say a MySQL provider.
For example, I'm using the following:
...
@dag(description='Call API', schedule_interval='05 * * * *', catchup=False, start_date=datetime(2015, 12, 1), default_args=default_args)
def pricing():
@task()
def get_last_known_price():
# get some value from DB
return 1
@task()
def get_from_api(last_known_datetime: int):
# get data from API based on datetime
return '{}'
I'm wanting to use the MySqlOperator here to grab some data from the database. Is this still possible with the new taskflow DAG declaration style?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
I'm looking for an example that combines the new taskflow annotation based task declarations with, say a MySQL provider.
For example, I'm using the following:
I'm wanting to use the MySqlOperator here to grab some data from the database. Is this still possible with the new taskflow DAG declaration style?
Would anyone have an example I could follow?
Cheers,
James.
Beta Was this translation helpful? Give feedback.
All reactions