generated from codespaces-examples/node
-
Notifications
You must be signed in to change notification settings - Fork 14
/
meltano_tut
executable file
·36 lines (31 loc) · 1007 Bytes
/
meltano_tut
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
#!/bin/sh
argument=$1
# proj dir uuid used for tracking demo launches
proj_dir=b54c6cfe2f8f831389a5b9ca409f410c
init () {
echo "=== Running wrapped 'meltano init' ==="
rm meltano.yml
rm -rf output
meltano init $proj_dir
rm $proj_dir/README.md
mv $proj_dir/* .
rm -r $proj_dir/
meltano environment add codespace
meltano config meltano set default_environment codespace
echo "\n\n"
echo "==============================="
echo "=== Ignore any next steps from above. We already took care of everything."
echo "=== Now head to the README.md and continue with step 2!"
}
if [ "$argument" = "init" ]; then
init
elif [ "$argument" = "clear" ]; then
echo "=== Running clear state ==="
meltano state clear dev:tap-csv-to-target-duckdb
rm output/my.duckdb
elif [ "$argument" = "select_db" ]; then
echo "=== Running select DB ==="
python codespaces_tutorial/select_duckdb.py
else
echo "provide one of init|select_db"
fi