/
pipeline.yaml
72 lines (59 loc) · 2.76 KB
/
pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
resources: ~
dag:
# The DAG acronym stands for directed acyclic graph. This block represents
# your data pipeline along with every property and configuration it needs to
# onboard your data.
airflow_version: 1
initialize:
dag_id: mouse_brain_map
default_args:
owner: "Google"
# When set to True, keeps a task from getting triggered if the previous schedule for the task hasn’t succeeded
depends_on_past: False
start_date: '2021-04-01'
max_active_runs: 1
schedule_interval: "@monthly" # run once a week at Sunday 12am
catchup: False
default_view: graph
tasks:
- operator: "GoogleCloudStorageToGoogleCloudStorageOperator"
# Initializes a GCS-to-GCS task for the DAG. This operator is used to copy
# GCS objects from one location to another.
# Task description
description: "Task to run a GoogleCloudStorageToGoogleCloudStorageOperator"
args:
# Arguments supported by this operator:
# https://airflow.apache.org/docs/apache-airflow/1.10.14/_api/airflow/contrib/operators/gcs_to_gcs/index.html#airflow.contrib.operators.gcs_to_gcs.GoogleCloudStorageToGoogleCloudStorageOperator
task_id: "copy_data_to_gcs_destination_bucket"
# The GCS bucket to copy the object/s from
source_bucket: "vizgen-brain-map"
# Use a trailing "/*" if you want to copy all objects under that path.
source_object: "BrainReceptorShowcase/*"
# The GCS bucket to copy the object/s to
destination_bucket: "{{ var.json.vizgen_merfish.destination_bucket }}"
# The GCS prefix to copy the object/s to
destination_object: "datasets/mouse_brain_map/BrainReceptorShowcase/"
# Use this argument if you don't want to keep the source object/s.
move_object: False
graph_paths:
# This is where you specify the relationships (i.e. directed paths/edges)
# among the tasks specified above. Use the bitshift operator to define the
# relationships and the `task_id` value above to represent tasks.
#
# For more info, see
# https://airflow.apache.org/docs/apache-airflow/stable/tutorial.html#setting-up-dependencies
- "copy_data_to_gcs_destination_bucket"