-
I try migrate simple flow to prefect 2 (flow_drop.py): @task(tags=['db', 'mysql'])
def update_mysql(mysql_conf:Secret):
conf = MySqlConf.parse_raw(mysql_conf.get())
drop_tags(conf)
@flow(name='Drop tags')
def drop_tags_flow():
# mysql_conf = PrefectSecret('MYSQL_MASTER')
mysql_conf = Secret.load("epool-mysql-dt")
update_mysql(mysql_conf)
def main():
drop_tags_flow() How to emulate Secret block in local execute? Console out:
|
Beta Was this translation helpful? Give feedback.
Answered by
tonal
Sep 4, 2022
Replies: 1 comment
-
Need save block before flow call. :) def main():
secret_block = Secret(value='my secret')
secret_block.save('epool-mysql-dt', overwrite=True)
drop_tags_flow() |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tonal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need save block before flow call. :)