google-cloud-composer

Can some provide me with the schema to recreate dag_run table in airflow-db.?

随声附和 提交于 2021-01-28 12:36:46
问题 I have a google cloud composer environment on GCP and I accidentally deleted the dag_runs table due to which airflow_scheduler kept on crashing and the airflow web-server would not come up. I was able to re-create the dag_run table in airflow-db which stopped the crashing, but i think i did not get the schema right as i get the below error when i manually trigger a dag on airflow webserver. Ooops. ____/ ( ( ) ) \___ /( ( ( ) _ )) ) )\ (( ( )( ) ) ( ) ) ((/ ( _( ) ( _) ) ( () ) ) ( ( ( (_) ((

Execute bash script on a dataproc cluster from a composer

Deadly 提交于 2021-01-27 22:55:18
问题 I wanted to add jars to a dataproc cluster in a specific location once the cluster has been created using a simple shell script. I would like to automate this step to run from a composer once the dataproc cluster has been created,the next step is to execute bash script which would add the jars to the data proc cluster. Can you suggest which airflow operator to use to execute bash scripts on the dataproc cluster? 回答1: For running a simple shell script on the master node, the easiest way would

Google Cloud Composer(Airflow) - dataflow job inside a DAG executes successfully, but the DAG fails

纵饮孤独 提交于 2020-06-27 07:29:26
问题 My DAG looks like this default_args = { 'start_date': airflow.utils.dates.days_ago(0), 'retries': 0, 'dataflow_default_options': { 'project': 'test', 'tempLocation': 'gs://test/dataflow/pipelines/temp/', 'stagingLocation': 'gs://test/dataflow/pipelines/staging/', 'autoscalingAlgorithm': 'BASIC', 'maxNumWorkers': '1', 'region': 'asia-east1' } } dag = DAG( dag_id='gcs_avro_to_bq_dag', default_args=default_args, description='ETL for loading data from GCS(present in the avro format) to BQ',