forked from microsoft/bobsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request microsoft#15 from microsoft/bobworking
Build 2020 demos
- Loading branch information
Showing
69 changed files
with
342,263 additions
and
0 deletions.
There are no files selected for viewing
1,557 changes: 1,557 additions & 0 deletions
1,557
demos/build2020/iqp/iqp_tablevariabledeferred.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
restore database WideWorldImporters from disk = 'c:\sql_sample_databases\WideWorldImporters-Full.bak' with | ||
move 'WWI_Primary' to 'c:\sql_sample_databases\WideWorldImporters.mdf', | ||
move 'WWI_UserData' to 'c:\sql_sample_databases\WideWorldImporters_UserData.ndf', | ||
move 'WWI_Log' to 'c:\sql_sample_databases\WideWorldImporters.ldf', | ||
move 'WWI_InMemory_Data_1' to 'c:\sql_sample_databases\WideWorldImporters_InMemory_Data_1', | ||
stats=5 | ||
go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# wwi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/mssql-tools | ||
|
||
COPY . / | ||
|
||
RUN chmod +x /db-init.sh | ||
CMD /bin/bash ./entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
USE [WideWorldImporters] | ||
GO | ||
SELECT @@VERSION | ||
GO | ||
PRINT 'How many objects are in the database' | ||
GO | ||
SELECT COUNT(*) AS numobjects FROM sys.objects | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
echo "Perform application testing...." | ||
|
||
# run a T-SQL script to perform sanity checks | ||
/opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P Sql2019isfast -d master -i apptest.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#start SQL Server, start the script to create/setup the DB | ||
#You need a non-terminating process to keep the container alive. | ||
#In a series of commands separated by single ampersands the commands to the left of the right-most ampersand are run in the background. | ||
#So - if you are executing a series of commands simultaneously using single ampersands, the command at the right-most position needs to be non-terminating | ||
/db-init.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
trigger: | ||
- master | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
steps: | ||
|
||
- task: DockerCompose@0 | ||
displayName: 'Build any containers' | ||
inputs: | ||
dockerComposeFiles: docker-compose.yml | ||
action: Run a Docker Compose command | ||
dockerComposeCommand: build | ||
|
||
- task: DockerCompose@0 | ||
displayName: 'Start up SQL Server' | ||
inputs: | ||
dockerComposeFiles: docker-compose.yml | ||
action: Run a Docker Compose command | ||
dockerComposeCommand: up -d mssql | ||
|
||
- task: DockerCompose@0 | ||
displayName: 'Create Database' | ||
inputs: | ||
dockerComposeFiles: docker-compose.yml | ||
action: Run a Docker Compose command | ||
dockerComposeCommand: up createdb | ||
|
||
- task: DockerCompose@0 | ||
displayName: 'Application Test' | ||
inputs: | ||
dockerComposeFiles: docker-compose.yml | ||
action: Run a Docker Compose command | ||
dockerComposeCommand: up apptest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/mssql-tools | ||
|
||
COPY . / | ||
|
||
RUN chmod +x /db-init.sh | ||
CMD /bin/bash ./entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# wait for the SQL Server to come up. We only need about 15 seconds. Azure Pipeline delay task appears to be | ||
sleep 15s | ||
|
||
echo "Create the WideWorldImporters Database...." | ||
# run the setup script to create the DB and the schema in the DB | ||
|
||
/opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P Sql2019isfast -d master -i wwi.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE DATABASE WideWorldImporters | ||
GO | ||
USE [WideWorldImporters] | ||
GO | ||
SELECT * FROM sys.objects | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#start SQL Server, start the script to create/setup the DB | ||
#You need a non-terminating process to keep the container alive. | ||
#In a series of commands separated by single ampersands the commands to the left of the right-most ampersand are run in the background. | ||
#So - if you are executing a series of commands simultaneously using single ampersands, the command at the right-most position needs to be non-terminating | ||
/db-init.sh | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: "3" | ||
services: | ||
mssql: | ||
image: mcr.microsoft.com/mssql/server:2019-CU3-ubuntu-18.04 | ||
environment: | ||
SA_PASSWORD: "Sql2019isfast" | ||
ACCEPT_EULA: "Y" | ||
MSSQL_AGENT_ENABLED: "true" | ||
container_name: mssql | ||
hostname: mssql | ||
|
||
createdb: | ||
build: ./createdb | ||
container_name: createdb | ||
hostname: createdb | ||
|
||
apptest: | ||
build: ./apptest | ||
container_name: apptest | ||
hostname: apptest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE orauser.rental_data( | ||
year int, | ||
month int, | ||
day int, | ||
rentalcount int, | ||
weekday int, | ||
holiday int, | ||
snow int, | ||
fholiday varchar2(255), | ||
fsnow varchar2(255), | ||
fweekday varchar2(255) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE USER orauser IDENTIFIED BY orapwd DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON users; | ||
GRANT CREATE SESSION TO orauser; | ||
GRANT CREATE TABLE TO orauser; | ||
GRANT CREATE VIEW TO orauser; | ||
GRANT CREATE ANY TRIGGER TO orauser; | ||
GRANT CREATE ANY PROCEDURE TO orauser; | ||
GRANT CREATE SEQUENCE TO orauser; | ||
GRANT CREATE SYNONYM TO orauser; |
Oops, something went wrong.