update bdc notebook (#6286)

* update bdc notebook and remove sql-image for now

* update test
This commit is contained in:
Alan Ren
2019-07-08 16:41:31 -07:00
committed by GitHub
parent bdb59ecf0c
commit 86df1605a4
6 changed files with 316 additions and 209 deletions

View File

@@ -1,72 +0,0 @@
{
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python",
"version": "3.6.6",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"pygments_lexer": "ipython3",
"nbconvert_exporter": "python",
"file_extension": ".py"
}
},
"nbformat_minor": 2,
"nbformat": 4,
"cells": [
{
"cell_type": "markdown",
"source": "First, pull the Microsoft SQL Server 2017 Image",
"metadata": {}
},
{
"cell_type": "code",
"source": "cmd = f'docker pull mcr.microsoft.com/mssql/server:2017-latest'\r\n!{cmd}",
"metadata": {},
"outputs": [],
"execution_count": 49
},
{
"cell_type": "markdown",
"source": "List all the containers",
"metadata": {}
},
{
"cell_type": "code",
"source": "cmd = f'docker ps -a'\r\n!{cmd}",
"metadata": {},
"outputs": [],
"execution_count": 50
},
{
"cell_type": "markdown",
"source": "Start a new container with SQL Server 2017",
"metadata": {}
},
{
"cell_type": "code",
"source": "import time\r\n\r\ncontainer_name = 'sql2017-' + time.strftime(\"%Y%m%d%H%M%S\", time.localtime())\r\nprint('New container name: ' + container_name)\r\n\r\nsql_port = 1433\r\nsa_password = \"<YourStrong!Passw0rd>\"\r\n\r\ncmd = f'docker run -e ACCEPT_EULA=Y -e \"SA_PASSWORD={sa_password}\" -p {sql_port}:{sql_port} --name {container_name} -d mcr.microsoft.com/mssql/server:2017-latest'\r\nprint(cmd)\r\n!{cmd}",
"metadata": {},
"outputs": [],
"execution_count": 51
},
{
"cell_type": "markdown",
"source": "List all the containers",
"metadata": {}
},
{
"cell_type": "code",
"source": "cmd = f'docker ps -a'\r\n!{cmd}",
"metadata": {},
"outputs": [],
"execution_count": 48
}
]
}