airflow

how to pass query parameter to sql file using bigquery operator

独自空忆成欢 提交于 2021-02-09 11:08:26
问题 I need access the parameter passed by BigqueryOperator in sql file, but I am getting error ERROR - queryParameters argument must have a type <class 'dict'> not <class 'list'> I am using below code: t2 = bigquery_operator.BigQueryOperator( task_id='bq_from_source_to_clean', sql='prepare.sql', use_legacy_sql=False, allow_large_results=True, query_params=[{ 'name': 'threshold_date', 'parameterType': { 'type': 'STRING' },'parameterValue': { 'value': '2020-01-01' } }], destination_dataset_table="{

Getting ModuleNotFoundError: No module named 'pandas' Error on Airflow Bash Operator

孤者浪人 提交于 2021-02-08 10:20:56
问题 My airflow bash operator suddenly getting an error ModuleNotFoundError: No module named 'pandas' It was worked perfectly for the last 2 months but stop working from yesterday. I didn't change anything on the server or didn't update my server. 回答1: BashOperator simply runs bash command on your machine. So check if your machine has pandas installed on it. If not, do pip install pandas 来源: https://stackoverflow.com/questions/53953410/getting-modulenotfounderror-no-module-named-pandas-error-on

Dynamic schedule_interval in Airflow

北城余情 提交于 2021-02-08 07:21:02
问题 I try to run a dynamic schedule_interval in Airflow like below. But it works only when I run the dag manually. Could you please help me say, if the dynamic schedule_interval could be a reason, why the dag does not run automatically or is there any other reasons for that? if datetime.today().day == 1: schedule_interval = '00 07 * * *' else: schedule_interval = '00 07 * * 1' Thank you! 回答1: You shouldn't set the schedule_interval to be dynamic like this as it can lead to unexpected results (as

Dynamic schedule_interval in Airflow

不羁的心 提交于 2021-02-08 07:19:40
问题 I try to run a dynamic schedule_interval in Airflow like below. But it works only when I run the dag manually. Could you please help me say, if the dynamic schedule_interval could be a reason, why the dag does not run automatically or is there any other reasons for that? if datetime.today().day == 1: schedule_interval = '00 07 * * *' else: schedule_interval = '00 07 * * 1' Thank you! 回答1: You shouldn't set the schedule_interval to be dynamic like this as it can lead to unexpected results (as

How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

倾然丶 夕夏残阳落幕 提交于 2021-02-07 23:12:41
问题 Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh? 回答1: You have a few options, but none will keep it active on a sleeping laptop. On a server: Can use --daemon to run as daemon: airflow scheduler --daemon Or, maybe run in background: airflow scheduler >& log.txt & Or, run inside 'screen' as above, then detach from screen using ctrl-a d, reattach as needed using 'screen -r'. That would work

How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

♀尐吖头ヾ 提交于 2021-02-07 23:11:21
问题 Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh? 回答1: You have a few options, but none will keep it active on a sleeping laptop. On a server: Can use --daemon to run as daemon: airflow scheduler --daemon Or, maybe run in background: airflow scheduler >& log.txt & Or, run inside 'screen' as above, then detach from screen using ctrl-a d, reattach as needed using 'screen -r'. That would work

How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

╄→гoц情女王★ 提交于 2021-02-07 23:10:55
问题 Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh? 回答1: You have a few options, but none will keep it active on a sleeping laptop. On a server: Can use --daemon to run as daemon: airflow scheduler --daemon Or, maybe run in background: airflow scheduler >& log.txt & Or, run inside 'screen' as above, then detach from screen using ctrl-a d, reattach as needed using 'screen -r'. That would work

How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

百般思念 提交于 2021-02-07 23:10:54
问题 Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh? 回答1: You have a few options, but none will keep it active on a sleeping laptop. On a server: Can use --daemon to run as daemon: airflow scheduler --daemon Or, maybe run in background: airflow scheduler >& log.txt & Or, run inside 'screen' as above, then detach from screen using ctrl-a d, reattach as needed using 'screen -r'. That would work

How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

拈花ヽ惹草 提交于 2021-02-07 23:10:25
问题 Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh? 回答1: You have a few options, but none will keep it active on a sleeping laptop. On a server: Can use --daemon to run as daemon: airflow scheduler --daemon Or, maybe run in background: airflow scheduler >& log.txt & Or, run inside 'screen' as above, then detach from screen using ctrl-a d, reattach as needed using 'screen -r'. That would work

How do you keep your airflow scheduler running in AWS EC2 while exiting ssh?

旧巷老猫 提交于 2021-02-07 23:10:19
问题 Hi I'm using Airflow and put my airflow project in EC2. However, how would one keep the airflow scheduler running while my mac goes sleep or exiting ssh? 回答1: You have a few options, but none will keep it active on a sleeping laptop. On a server: Can use --daemon to run as daemon: airflow scheduler --daemon Or, maybe run in background: airflow scheduler >& log.txt & Or, run inside 'screen' as above, then detach from screen using ctrl-a d, reattach as needed using 'screen -r'. That would work