File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 12
12
"extensions" : [
13
13
" caarlos0.language-prometheus" ,
14
14
" databricks.databricks" ,
15
+ " github.vscode-github-actions" ,
15
16
" hashicorp.terraform" ,
16
17
" hediet.vscode-drawio" ,
17
18
" jeppeandersen.vscode-kafka" ,
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ SQLCMD=" /opt/mssql-tools18/bin/sqlcmd"
4
+
3
5
# do this in a loop because the timing for when the SQL instance is ready is indeterminate
4
6
for i in {1..60};
5
7
do
6
- /opt/mssql-tools/bin/sqlcmd -S " $MSSQL_HOST " -U " $MSSQL_SA_USER " -P " $MSSQL_SA_PASSWORD "
8
+ $SQLCMD -C -S " $MSSQL_HOST " -U " $MSSQL_SA_USER " -P " $MSSQL_SA_PASSWORD "
7
9
8
10
if [ $? -eq 0 ]
9
11
then
15
17
fi
16
18
done
17
19
18
- /opt/mssql-tools/bin/sqlcmd -S " $MSSQL_HOST " -U " $MSSQL_SA_USER " -P " $MSSQL_SA_PASSWORD " -i create_db.sql -v DBName=" $DB_NAME "
19
- /opt/mssql-tools/bin/sqlcmd -S " $MSSQL_HOST " -U " $MSSQL_SA_USER " -P " $MSSQL_SA_PASSWORD " -d " $DB_NAME " -i create_table.sql
20
+ $SQLCMD -C -S " $MSSQL_HOST " -U " $MSSQL_SA_USER " -P " $MSSQL_SA_PASSWORD " -i create_db.sql -v DBName=" $DB_NAME "
21
+ $SQLCMD -C -S " $MSSQL_HOST " -U " $MSSQL_SA_USER " -P " $MSSQL_SA_PASSWORD " -d " $DB_NAME " -i create_table.sql
Original file line number Diff line number Diff line change 1
- version : " 3.8"
2
1
services :
3
2
zookeeper :
4
3
image : confluentinc/cp-zookeeper
Original file line number Diff line number Diff line change 16
16
# "-h -1" SQLCMD flag is used to remove column headers from the output
17
17
# "SET NOCOUNT ON;" before the intended SQL query is used to remove output such as "n row(s) affected"
18
18
# xargs removes the leading and trailing spaces from the output
19
- SQL_CMD=" /opt/mssql-tools /bin/sqlcmd -S localhost -U SA -P \" $MSSQL_SA_PASSWORD \" -d \" $DB_NAME \" -h -1 -Q \
19
+ SQL_CMD=" /opt/mssql-tools18 /bin/sqlcmd -C -S localhost -U SA -P \" $MSSQL_SA_PASSWORD \" -d \" $DB_NAME \" -h -1 -Q \
20
20
\" SET NOCOUNT ON; SELECT COUNT(1) FROM $TABLE_NAME \" | xargs"
21
21
22
22
ROW_COUNT=$( docker compose exec sql-server bash -c " $SQL_CMD " || true)
You can’t perform that action at this time.
0 commit comments