forked from lavishsheth/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dataplex: Qwik Start - Console
41 lines (30 loc) · 1.17 KB
/
Dataplex: Qwik Start - Console
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
#----CHANGE REGION---
export REGION=us-west1
gcloud services enable dataplex.googleapis.com
export PROJECT_ID=$(gcloud config get-value project)
gcloud config set compute/region $REGION
gsutil mb -c standard -l $REGION gs://$PROJECT_ID
gcloud dataplex lakes create sensors \
--location=$REGION \
--display-name="sensors" \
--description="sensors Domain"
gcloud dataplex zones create temperature-raw-data \
--location=$REGION \
--lake=sensors \
--display-name="temperature raw data" \
--resource-location-type=SINGLE_REGION \
--type=RAW \
--discovery-enabled \
--discovery-schedule="0 * * * *"
gcloud dataplex assets create measurements \
--location=$REGION \
--lake=sensors \
--zone=temperature-raw-data \
--display-name="measurements" \
--resource-type=STORAGE_BUCKET \
--resource-name=projects/$PROJECT_ID/buckets/$PROJECT_ID \
--discovery-enabled
gcloud dataplex assets delete measurements --location=$REGION --zone=temperature-raw-data --lake=sensors
gcloud dataplex zones delete temperature-raw-data --location=$REGION --lake=sensors
gcloud dataplex lakes delete sensors --location=$REGION
#---------PRESS Y : 3 TIMES--------------------