-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
99 lines (98 loc) · 3.79 KB
/
deploy.sh
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
JOB_ID=$(databricks jobs create --json '{"name": "ingest-process-pipeline",
"email_notifications": {
"no_alert_for_skipped_runs": "false"
},
"webhook_notifications": {},
"timeout_seconds": 0,
"max_concurrent_runs": 1,
"tasks": [
{
"task_key": "ingest-data",
"run_if": "ALL_SUCCESS",
"notebook_task": {
"notebook_path": "/exercise/data_ingestion",
"source": "WORKSPACE"
},
"job_cluster_key": "ingest-process-pipeline-cluster",
"timeout_seconds": 0,
"email_notifications": {},
"notification_settings": {
"no_alert_for_skipped_runs": "false",
"no_alert_for_canceled_runs": "false",
"alert_on_last_attempt": "false"
}
},
{
"task_key": "process-data-2014",
"depends_on": [
{
"task_key": "ingest-data"
}
],
"run_if": "ALL_SUCCESS",
"notebook_task": {
"notebook_path": "/exercise/data-analysis",
"base_parameters": {
"year": "2014"
},
"source": "WORKSPACE"
},
"job_cluster_key": "ingest-process-pipeline-cluster",
"timeout_seconds": 0,
"email_notifications": {},
"notification_settings": {
"no_alert_for_skipped_runs": "false",
"no_alert_for_canceled_runs": "false",
"alert_on_last_attempt": "false"
}
},
{
"task_key": "process-data-2015",
"depends_on": [
{
"task_key": "ingest-data"
}
],
"run_if": "ALL_SUCCESS",
"notebook_task": {
"notebook_path": "/exercise/data-analysis",
"base_parameters": {
"year": "2015"
},
"source": "WORKSPACE"
},
"job_cluster_key": "ingest-process-pipeline-cluster",
"timeout_seconds": 0,
"email_notifications": {}
}
],
"job_clusters": [
{
"job_cluster_key": "ingest-process-pipeline-cluster",
"new_cluster": {
"cluster_name": "",
"spark_version": "14.0.x-scala2.12",
"spark_conf": {
"spark.databricks.delta.preview.enabled": "true",
"spark.master": "local[*, 4]",
"spark.databricks.cluster.profile": "singleNode"
},
"azure_attributes": {
"first_on_demand": 1,
"availability": "ON_DEMAND_AZURE",
"spot_bid_max_price": -1
},
"node_type_id": "Standard_DS3_v2",
"custom_tags": {
"ResourceClass": "SingleNode"
},
"enable_elastic_disk": "true",
"data_security_mode": "SINGLE_USER",
"runtime_engine": "STANDARD",
"num_workers": 0
}
}
],
"format": "MULTI_TASK"
}' | jq '.job_id')
echo "Successfully Deployed Job ID: $JOB_ID"