forked from dbt-labs/dbt-external-tables
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_test.sh
executable file
·35 lines (31 loc) · 871 Bytes
/
run_test.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
#!/bin/bash
VENV="venv/bin/activate"
if [[ ! -f $VENV ]]; then
python3 -m venv venv
. $VENV
pip install --upgrade pip setuptools
if [ $1 == 'databricks' ]
then
pip install --pre dbt-spark[ODBC] --upgrade
elif [ $1 == 'synapse' ]
then
pip install --pre dbt-synapse --upgrade
elif [ $1 == 'azuresql' ]
then
pip install --pre dbt-sqlserver --upgrade
else
pip install --pre dbt --upgrade
fi
fi
. $VENV
cd integration_tests
if [[ ! -e ~/.dbt/profiles.yml ]]; then
mkdir -p ~/.dbt
cp ci/sample.profiles.yml ~/.dbt/profiles.yml
fi
dbt deps --target $1
dbt seed --full-refresh --target $1
dbt run-operation prep_external --target $1
dbt run-operation stage_external_sources --var 'ext_full_refresh: true' --target $1
dbt run-operation stage_external_sources --target $1
dbt test --target $1