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 1212 "extensions" : [
1313 " caarlos0.language-prometheus" ,
1414 " databricks.databricks" ,
15+ " github.vscode-github-actions" ,
1516 " hashicorp.terraform" ,
1617 " hediet.vscode-drawio" ,
1718 " jeppeandersen.vscode-kafka" ,
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ SQLCMD=" /opt/mssql-tools18/bin/sqlcmd"
4+
35# do this in a loop because the timing for when the SQL instance is ready is indeterminate
46for i in {1..60};
57do
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 "
79
810 if [ $? -eq 0 ]
911 then
1517 fi
1618done
1719
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"
21services :
32 zookeeper :
43 image : confluentinc/cp-zookeeper
Original file line number Diff line number Diff line change 1616 # "-h -1" SQLCMD flag is used to remove column headers from the output
1717 # "SET NOCOUNT ON;" before the intended SQL query is used to remove output such as "n row(s) affected"
1818 # 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 \
2020 \" SET NOCOUNT ON; SELECT COUNT(1) FROM $TABLE_NAME \" | xargs"
2121
2222 ROW_COUNT=$( docker compose exec sql-server bash -c " $SQL_CMD " || true)
You can’t perform that action at this time.
0 commit comments