Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated WML Python Client V4 - 1.0.58 #5

Open
wants to merge 487 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
487 commits
Select commit Hold shift + click to select a range
f62af51
clean up
Mar 25, 2019
480a147
dap/dsx-documentation-source/issues/2028
Apr 3, 2019
5f59cb3
dap/dsx-documentation-source/issues/2085
Apr 8, 2019
5aaa0fd
dap/dsx-documentation-source/issues/2094
Apr 12, 2019
c5b0495
dap/dsx-documentation-source/issues/2094
Apr 12, 2019
af2ffca
dap/dsx-documentation-source/issues/2085
May 8, 2019
0fa0cd1
dap/dsx-documentation-source/issues/2085
May 8, 2019
5478fef
dap/dsx-documentation-source/issues/2085
May 8, 2019
aaff94e
dap/dsx-documentation-source/issues/2085
May 8, 2019
8d9adf7
dap/dsx-documentation-source/issues/2085
May 8, 2019
e28a67e
dap/dsx-documentation-source/issues/2085
May 8, 2019
38f7c38
dap/dsx-documentation-source/issues/2085
May 8, 2019
869374f
dap/dsx-documentation-source/issues/2085
May 8, 2019
22f1790
dap/dsx-documentation-source/issues/2085
May 8, 2019
8f260b3
dap/dsx-documentation-source/issues/2085
May 8, 2019
a980d5d
dap/dsx-documentation-source/issues/2085
May 8, 2019
ddf43ad
dap/dsx-documentation-source/issues/2085
May 8, 2019
9810bbc
Remove because data set no longer available.
May 8, 2019
83df412
dap/dsx-documentation-source/issues/2007
May 9, 2019
93de519
dap/dsx-documentation-source/issues/2059
May 17, 2019
ae73c9b
dap/dsx-documentation-source/issues/2059
May 17, 2019
49c5ce9
dap/dsx-documentation-source/issues/2085
May 21, 2019
4289a1f
dap/dsx-documentation-source/issues/2085
May 21, 2019
daaa6c0
dap/dsx-documentation-source/issues/2059
May 24, 2019
5251248
dap/dsx-documentation-source/issues/2059
May 24, 2019
a9e1db6
dap/dsx-documentation-source/issues/2059
May 26, 2019
763c334
dap/dsx-documentation-source/issues/2059
May 27, 2019
8417926
dap/dsx-documentation-source/issues/2059
May 27, 2019
74bcc8f
dap/dsx-documentation-source/issues/2059
May 27, 2019
ffb06f7
dap/dsx-documentation-source/issues/2059
May 27, 2019
bcbf98c
dap/dsx-documentation-source/issues/2059
May 27, 2019
6dda854
dap/dsx-documentation-source/issues/2157
Jun 5, 2019
8aef7ec
dap/dsx-documentation-source/issues/2157
Jun 5, 2019
c8cffa9
dap/dsx-documentation-source/issues/2066
Jun 7, 2019
cade52c
file name change
Jun 7, 2019
79c0482
dap/dsx-documentation-source/issues/2157
Jun 10, 2019
91b7d94
dap/dsx-documentation-source/issues/2157
Jun 10, 2019
c6273cf
dap/dsx-documentation-source/issues/2157
Jun 10, 2019
d4b2f1d
dap/dsx-documentation-source/issues/2059
Jun 10, 2019
2ee5629
dap/dsx-documentation-source/issues/2059
Jun 11, 2019
255cfab
dap/dsx-documentation-source/issues/2059
Jun 11, 2019
0d58e25
dap/dsx-documentation-source/issues/2023
Jun 12, 2019
497730f
dap/dsx-documentation-source/issues/2023
Jun 12, 2019
d0cd6e9
dap/dsx-documentation-source/issues/2169
Jun 13, 2019
164d9da
dap/dsx-documentation-source/issues/2169
Jun 14, 2019
064689a
dap/dsx-documentation-source/issues/2168
Jun 21, 2019
9dc4129
dap/dsx-documentation-source/issues/2168
Jun 21, 2019
a8505c8
dsx-documentation-source/issues/2059
Jun 27, 2019
122677b
Fix formatting
Jun 29, 2019
688c1c1
Add blog link
Jun 29, 2019
2f1c2b0
dap/dsx-documentation-source/issues/2059
Jun 29, 2019
9644f54
dap/dsx-documentation-source/issues/2059
Jun 29, 2019
40add85
dap/dsx-documentation-source/issues/2094
Jul 11, 2019
fa68665
Python 3.6 updates
mjmanley Jul 12, 2019
e653b2c
Python 3.6 updates ml-planning/issues/7469
mjmanley Jul 12, 2019
04923d3
delete
mjmanley Jul 12, 2019
634c619
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
9a2a8d1
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
8f93592
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
074a7eb
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
3afdbe9
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
01efeef
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
c692ea4
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
3390618
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
3c18686
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
0fe63f7
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
031d11c
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
2d2a08c
Python 3.6 ml-planning/issues/7469
mjmanley Jul 12, 2019
76b5171
Python 3.6
mjmanley Jul 12, 2019
e072c4e
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
a5a6ca7
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
0152201
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
be71a9e
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
623bda1
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
edad63d
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
ecdf459
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
405dddb
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
4535573
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
9c7073d
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
5647fc0
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
3f74712
Python 3.6 ml-planning/issues/7469
mjmanley Jul 15, 2019
8a461cc
Duplicate for ml-planning/issues/7469
mjmanley Jul 15, 2019
b88f44b
Duplicate for ml-planning/issues/7469
mjmanley Jul 15, 2019
2410fe1
Python 3.6 ml-planning/issues/7469
mjmanley Jul 16, 2019
27bfc16
Python 3.6 ml-planning/issues/7469
mjmanley Jul 16, 2019
d81021d
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 16, 2019
4699122
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 16, 2019
5714ed8
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 16, 2019
c402fd4
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 16, 2019
4d0dedf
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 17, 2019
b030204
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 17, 2019
ccbb62f
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 17, 2019
ed47a3c
Python 3.6 /ml-planning/issues/7469
mjmanley Jul 17, 2019
955c529
Python 3.6 ml-planning/issues/7469
mjmanley Jul 19, 2019
3dba3f2
Python 3.6 ml-planning/issues/7469
mjmanley Jul 19, 2019
ef86cdc
NGP-TWC/ml-planning #9537
mjmanley Jul 19, 2019
3f2dd1e
NGP-TWC/ml-planning #9537
mjmanley Jul 19, 2019
25c1ed1
NGP-TWC/ml-planning #9537
mjmanley Jul 19, 2019
2a5435a
NGP-TWC/ml-planning #9537
mjmanley Jul 19, 2019
f4d9720
Python 3.6 ml-planning/issues/7469
mjmanley Jul 19, 2019
4a636a4
Python 3.6 ml-planning/issues/7469
mjmanley Jul 19, 2019
bb6d0d8
dap/dsx-documentation-source/issues/2179
Jul 19, 2019
4523b13
dap/dsx-documentation-source/issues/2061
Jul 19, 2019
2e7a01a
dap/dsx-documentation-source/issues/2061
Jul 19, 2019
a24deba
dap/dsx-documentation-source/issues/2061
Jul 24, 2019
3f50ac0
dap/dsx-documentation-source/issues/2061
wswtizer Jul 24, 2019
cc57b51
dap/dsx-documentation-source/issues/2059
Jul 24, 2019
7f59eec
Merge remote-tracking branch 'origin/master'
Jul 25, 2019
37f53fc
dap/dsx-documentation-source/issues/2059
Jul 25, 2019
9fdf142
dap/dsx-documentation-source/issues/2243
Jul 27, 2019
a32ad0a
dap/dsx-documentation-source/issues/2243
Jul 27, 2019
1be9f2e
dap/dsx-documentation-source/issues/2243
Jul 27, 2019
f114e77
dap/dsx-documentation-source/issues/2243
Jul 27, 2019
43d37b8
dap/dsx-documentation-source/issues/2243
Jul 29, 2019
058d263
dap/dsx-documentation-source/issues/2243
Jul 29, 2019
9d0b10d
NGP-TWC/ml-planning/issues/7469
Jul 29, 2019
06e6182
[NGP-TWC/ml-planning] (#7469)
mjmanley Aug 8, 2019
eec94a3
[NGP-TWC/ml-planning] (#7469)
mjmanley Aug 8, 2019
ff5a1c1
NGP-TWC/ml-planning #7469
mjmanley Aug 9, 2019
0746572
NGP-TWC/ml-planning #7469
mjmanley Aug 9, 2019
f4da116
NGP-TWC/ml-planning #7469
mjmanley Aug 9, 2019
27bea20
delete
mjmanley Aug 9, 2019
db86f6a
ml-planning/issues/7469
mjmanley Aug 9, 2019
f2d81c5
ml-planning/issues/7469
mjmanley Aug 9, 2019
bd10271
Update August 2019
mjmanley Aug 13, 2019
f9240d3
Update August 2019
mjmanley Aug 13, 2019
1c51ef5
Update for #2271
mjmanley Aug 26, 2019
141aa61
Update for #2271
mjmanley Aug 26, 2019
6da1817
updates
mjmanley Aug 26, 2019
bbd3043
updates
mjmanley Aug 26, 2019
3d53953
#9421
mjmanley Sep 4, 2019
f2bdd2f
#9421
mjmanley Sep 4, 2019
70e0b15
#2285
mjmanley Sep 6, 2019
aac2313
#2285
mjmanley Sep 6, 2019
ad24e1e
Wo
mjmanley Sep 12, 2019
7143c36
update link
mjmanley Sep 12, 2019
444a495
dap/dsx-documentation-source/issues/2059
Sep 17, 2019
75fe139
commit
Sep 17, 2019
814fd1b
Merge remote-tracking branch 'origin/master'
Sep 17, 2019
4a18189
Adding readme to desktop folder
Sep 20, 2019
d182901
adding readme
Sep 20, 2019
dca2103
change folder name
Sep 20, 2019
c221255
rename folder
Sep 20, 2019
4dea32d
rename folder
Sep 20, 2019
9041026
NGP-TWC/ml-planning/issues/10581
Sep 27, 2019
5a66c43
Update README.md
wswtizer Sep 27, 2019
13fb955
Update README.md
wswtizer Sep 27, 2019
876b8da
Update README.md
wswtizer Sep 27, 2019
17ad4bd
Update readme
Sep 27, 2019
25ee1b9
Update readme
Sep 27, 2019
c51ea95
NGP-TWC/ml-planning/issues/10581
Oct 4, 2019
751a0b2
ngp-twc/ml-planning/issues/8498
Oct 4, 2019
5859773
ngp-twc/ml-planning/issues/8498
Oct 4, 2019
79252e6
ngp-twc/ml-planning/issues/8498
Oct 4, 2019
d8e54c1
dap/dsx-documentation-source/issues/2314
Oct 10, 2019
a2412d0
Updates Deploy AutoAI model 2 notebooks
mjmanley Oct 21, 2019
5923482
Updates Deploy AutoAI model 2 notebooks
mjmanley Oct 21, 2019
3f16c76
updates AutoAI python
mjmanley Oct 21, 2019
795c95a
delete
mjmanley Oct 21, 2019
243e59b
Upload AutoAI python
mjmanley Oct 21, 2019
afd3061
Upload AutoAI python
mjmanley Oct 21, 2019
59940ef
NGP-TWC/ml-planning/issues/9667
Oct 22, 2019
431b5ee
NGP-TWC/ml-planning/issues/10581
Oct 22, 2019
c0c5e30
NGP-TWC/ml-planning/issues/10581
Oct 22, 2019
0efb3bf
#9667
mjmanley Oct 23, 2019
0631266
#9667
mjmanley Oct 23, 2019
2456601
#2134 and #9241
mjmanley Oct 23, 2019
1beb4f9
#2134 and #9241
mjmanley Oct 23, 2019
070a2bb
#2344 #9667
mjmanley Oct 23, 2019
3d81dde
#2344 #9667
mjmanley Oct 23, 2019
f1d1619
delete
mjmanley Oct 28, 2019
7d720be
#2317
mjmanley Oct 28, 2019
29ce2e7
#2317
mjmanley Oct 28, 2019
20baf2c
Delete
mjmanley Oct 28, 2019
196175e
Delete
mjmanley Oct 28, 2019
726ea5c
Delete
mjmanley Oct 29, 2019
13f3c54
#9667 #2344
mjmanley Oct 29, 2019
4da2a66
Delete
mjmanley Oct 29, 2019
bfcf531
#2344 #9667
mjmanley Oct 29, 2019
f9aa8cc
Delete
mjmanley Oct 29, 2019
d6ef5db
# 2317
mjmanley Oct 29, 2019
3ee5c50
Delete Deploy a non-supported custom model to the wml repo.html
mjmanley Oct 29, 2019
07ad7dd
Delete
mjmanley Oct 29, 2019
2a1a3fa
# 2317
mjmanley Oct 29, 2019
7401427
#10581
mjmanley Nov 4, 2019
c0ec33a
NGP-TWC/ml-planning/issues/10837
mjmanley Nov 5, 2019
a174877
NGP-TWC/ml-planning/issues/10837
mjmanley Nov 5, 2019
a7d9193
NGP-TWC/ml-planning/issues/10837
mjmanley Nov 5, 2019
bdba45d
NGP-TWC/ml-planning/issues/10837
mjmanley Nov 5, 2019
2bfe673
Delete
mjmanley Nov 5, 2019
a798a12
[NGP-TWC/ml-planning](#10837)
mjmanley Nov 5, 2019
503b44e
[NGP-TWC/ml-planning]#10837
mjmanley Nov 5, 2019
52cf834
[NGP-TWC/ml-planning]#10837
mjmanley Nov 5, 2019
4e30b1e
NGP-TWC/ml-planning #8498
mjmanley Nov 8, 2019
041ebd5
update README
mjmanley Nov 8, 2019
f562fda
dsx-documentation-source/issues/2331
mjmanley Nov 11, 2019
b92a3ab
dsx-documentation-source/issues/2331
mjmanley Nov 11, 2019
0cfc656
NGP-TWC/ml-planning #10837
mjmanley Nov 13, 2019
35fa7e2
NGP-TWC/ml-planning #10837
mjmanley Nov 13, 2019
caaf157
Add files via upload
AshleyZhao Nov 18, 2019
3c02cdc
Add files via upload
AshleyZhao Nov 18, 2019
15a1521
Test
AshleyZhao Nov 18, 2019
9321bca
Delete test file
AshleyZhao Nov 18, 2019
5390ce5
new folder
Nov 20, 2019
d00e8cb
rm folder
Nov 20, 2019
e21c6f5
New folder
Nov 21, 2019
3ded30b
Updates Dialog Skill
mjmanley Nov 22, 2019
2371732
Updates Dialog Skill
mjmanley Nov 22, 2019
e2827e7
Add CP4D sample notebooks
AshleyZhao Nov 22, 2019
617973b
Update README.md
AshleyZhao Nov 22, 2019
d22d88b
Update README.md
AshleyZhao Nov 22, 2019
f1a4d39
Delete Use_scikit-learn_to_predict_car_price_Ba_lxcDZKjV5.ipynb
AshleyZhao Nov 22, 2019
3a0a23c
Rename Save__compress__and_deploy_a_Keras_model_sOG6bjFDa.ipynb to Sa…
AshleyZhao Nov 22, 2019
8a10bba
Rename Use_PMML_to_predict_species_of_irises_cp_3D7N8nR17.ipynb to Us…
AshleyZhao Nov 22, 2019
00f478f
Rename Use_Python_function_feature_to_scrape_a__GI3P1Da7b.ipynb to Us…
AshleyZhao Nov 22, 2019
23ade61
Rename Use_scikit-learn_to_predict_hand-written_hn-xLx_oI.ipynb to Us…
AshleyZhao Nov 22, 2019
fd9c888
Rename Use_scikit-learn_to_predict_the_price_of_dXvbAH73y.ipynb to Us…
AshleyZhao Nov 22, 2019
67a6bf3
Removed broken link
AshleyZhao Nov 25, 2019
afa5edf
Delete Healthcare Python Streaming Application.ipynb.json
AshleyZhao Nov 25, 2019
b1087d0
Delete Healthcare Python Streaming Application Demo.ipynb
AshleyZhao Nov 25, 2019
779806a
Delete Build a Python app on the Streaming Analytics service.html
AshleyZhao Dec 2, 2019
a20749b
Add files via upload
AshleyZhao Dec 2, 2019
b2a4b90
Rename Build a Python app on the Streaming Anal-2.html to Build a Pyt…
AshleyZhao Dec 2, 2019
85ac7f7
Delete Data model with Streaming Analytics and Python.html
AshleyZhao Dec 2, 2019
a00ca64
Rename Score a neural network model in real tim.html to Score a neura…
AshleyZhao Dec 2, 2019
2fa68d6
Delete Data model with Streaming Analytics and Python.ipynb
AshleyZhao Dec 2, 2019
b0ba2d4
Delete Build a Python app on the Streaming Analytics service.ipynb
AshleyZhao Dec 2, 2019
a300ce4
Add files via upload
AshleyZhao Dec 2, 2019
fcac886
Add files via upload
AshleyZhao Dec 2, 2019
8c91848
Add files via upload
AshleyZhao Dec 2, 2019
f94a117
Create readme.md
jforgo Dec 4, 2019
4c3ecf5
Update README.md
AshleyZhao Dec 4, 2019
15af789
Update README.md
AshleyZhao Dec 4, 2019
1de1468
Add files via upload
AshleyZhao Dec 9, 2019
de423b9
Add files via upload
AshleyZhao Dec 9, 2019
7f7d3e5
Add new folder
AshleyZhao Dec 11, 2019
d91eb26
Add files via upload
AshleyZhao Dec 11, 2019
fb1ee9a
Create test
AshleyZhao Dec 11, 2019
88758e4
Add files via upload
AshleyZhao Dec 11, 2019
a5d5176
Update readme.md
AshleyZhao Dec 11, 2019
30c3641
add notebook for managing users
jforgo Dec 13, 2019
119c050
#10837
mjmanley Dec 16, 2019
1dc77b0
#10837
mjmanley Dec 16, 2019
efc1ef4
Use Tensorflow updates
mjmanley Dec 19, 2019
8df8553
User Tensorflow updates
mjmanley Dec 19, 2019
224a056
Delete wrong name
mjmanley Dec 19, 2019
170faff
#10387
mjmanley Dec 19, 2019
fd6f9be
Delete wrong named file
mjmanley Dec 19, 2019
5bed1fb
#10387
mjmanley Dec 19, 2019
49fcaa2
upgrade wml python client verison and set ssl key to be false.
jkyawIbm Dec 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13,662 changes: 13,662 additions & 0 deletions Cloud/Archive/Access Db2 Warehouse on Cloud and Db2 with Python.html

Large diffs are not rendered by default.

992 changes: 992 additions & 0 deletions Cloud/Archive/Access Db2 Warehouse on Cloud and Db2 with Python.ipynb

Large diffs are not rendered by default.

12,857 changes: 12,707 additions & 150 deletions Cloud/Archive/Access MySQL with Python.html

Large diffs are not rendered by default.

131 changes: 80 additions & 51 deletions Cloud/IPYNB/Access+MySQL+with+Python.ipynb → Cloud/Archive/Access MySQL with Python.ipynb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div style=\"background:#F5F7FA; height:100px; padding: 2em; font-size:14px;\">\n",
"<span style=\"font-size:18px;color:#152935;\">Want to do more?</span><span style=\"border: 1px solid #3d70b2;padding: 15px;float:right;margin-right:40px; color:#3d70b2; \"><a href=\"https://ibm.co/wsnotebooks\" target=\"_blank\" style=\"color: #3d70b2;text-decoration: none;\">Sign Up</a></span><br>\n",
"<span style=\"color:#5A6872;\"> Try out this notebook with your free trial of IBM Watson Studio.</span>\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -8,7 +18,7 @@
"\n",
"This notebook shows how to access a MySQL database when using Python.\n",
"\n",
"This notebook runs on Python with Spark 2.0.\n",
"This notebook runs on Python 2 with Spark 2.1.\n",
"\n",
"## Table of contents\n",
"\n",
Expand All @@ -26,9 +36,8 @@
"\n",
"## Setup\n",
"\n",
"Before beginning you will need access to a *MySQL* database. MySQL is an open-source relational database management system (RDBMS) that is widely used as a client–server model RDBMS. To learn more, see the [MySQL website](https://www.mysql.com/).\n",
"\n",
"You should have a MySQL instance installed and running in the cloud. You can use [Amazon RDS (Relational Database Service)](http://aws.amazon.com/rds/mysql/) to set up, operate, and scale a MySQL instance. \n",
"You should have a MySQL instance installed and running in the cloud. MySQL is an open-source relational database management system (RDBMS) that is widely used as a client–server model RDBMS. To learn more, see the [MySQL website](https://www.mysql.com/).\n",
" \n",
"__Note:__ if you are using an Amazon RDS service, make sure it accept connections from every IP.\n",
"\n",
"\n",
Expand All @@ -41,25 +50,15 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: MySQL-python in /usr/local/src/bluemix_jupyter_bundle.v52/notebook/lib/python2.7/site-packages\r\n"
]
}
],
"outputs": [],
"source": [
"!pip install MySQL-python --user"
"!pip install -q MySQL-python --user"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import MySQLdb"
Expand All @@ -83,28 +82,40 @@
"Connecting to MySQL database requires the following information:\n",
"* Host name or IP address \n",
"* Host port\n",
"* default database name\n",
"* Database name\n",
"* User ID\n",
"* User password\n",
"\n",
"All of this information must be captured in a connection string in a subsequent step. Provide the MySQL connection information as shown:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"#Enter the values for you database connection\n",
"dsn_database = \"\" # for example \"BLUDB\"\n",
"dsn_hostname = \"\" # for example \"mydbinstance.cz6pjylrdjko.us-east-1.rds.amazonaws.com\"\n",
"dsn_port = 3306 # for example 3306 without quotation marks\n",
"dsn_uid = \"\" # for example \"user1\"\n",
"dsn_pwd = \"\" # for example \"7dBZ3jWt9xN6$o0JiX!m\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create the database connection\n",
"Set up a connection as follows. If a connect cannot be made an exception will be raised. \n",
"*conn.cursor* will return a cursor object and you can use this cursor to perform queries:"
"Set up a connection as follows. If a connection cannot be made, an exception will be raised. \n",
"`conn.cursor` will return a cursor object and you can use this cursor to perform queries:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"conn = MySQLdb.connect(host=dsn_hostname, port=dsn_port, user=dsn_uid, passwd=dsn_pwd, db=dsn_database)"
Expand All @@ -123,10 +134,8 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"conn.query(\"\"\"DROP TABLE IF EXISTS Cars\"\"\")\n",
Expand All @@ -144,10 +153,8 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"conn.query(\"\"\"INSERT INTO Cars VALUES(1,'Audi',52642)\"\"\")\n",
Expand All @@ -171,11 +178,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1L, 'Audi', 52642L)"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cursor=conn.cursor()\n",
"cursor.execute(\"\"\"SELECT * FROM Cars\"\"\")\n",
Expand All @@ -191,13 +207,28 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Show me the rows from the table:\n",
"\n",
"((2L, 'Mercedes', 57127L),\n",
" (3L, 'Skoda', 9000L),\n",
" (4L, 'Volvo', 29000L),\n",
" (5L, 'Bentley', 350000L),\n",
" (6L, 'Citroen', 21000L),\n",
" (7L, 'Hummer', 41400L),\n",
" (8L, 'Volkswagen', 21600L))\n"
]
}
],
"source": [
"print \"\\nShow me the databases:\\n\"\n",
"print \"\\nShow me the rows from the table:\\n\"\n",
"rows = cursor.fetchall()\n",
"import pprint\n",
"pprint.pprint(rows)"
Expand All @@ -213,10 +244,8 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"conn.close()"
Expand All @@ -236,7 +265,7 @@
"metadata": {},
"source": [
"## Want to learn more?\n",
"### Free courses on <a href=\"https://bigdatauniversity.com/courses/?utm_source=tutorial-dashdb-python&utm_medium=github&utm_campaign=bdu/\" rel=\"noopener noreferrer\" target=\"_blank\">Big Data University</a>: <a href=\"https://bigdatauniversity.com/courses/?utm_source=tutorial-dashdb-python&utm_medium=github&utm_campaign=bdu\" rel=\"noopener noreferrer\" target=\"_blank\"><img src = \"https://ibm.box.com/shared/static/xomeu7dacwufkoawbg3owc8wzuezltn6.png\" width=600px> </a>"
"### Free courses on <a href=\"https://bigdatauniversity.com/courses/?utm_source=tutorial-dashdb-python&utm_medium=github&utm_campaign=bdu/\" rel=\"noopener noreferrer\" target=\"_blank\">Cognitive Class</a>: <a href=\"https://bigdatauniversity.com/courses/?utm_source=tutorial-dashdb-python&utm_medium=github&utm_campaign=bdu\" rel=\"noopener noreferrer\" target=\"_blank\"><img src = \"https://ibm.box.com/shared/static/xomeu7dacwufkoawbg3owc8wzuezltn6.png\" width=600px> </a>"
]
},
{
Expand All @@ -254,15 +283,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Copyright © 2016 Big Data University. This notebook and its source code are released under the terms of the <a href=\"https://bigdatauniversity.com/mit-license/\" rel=\"noopener noreferrer\" target=\"_blank\">MIT License</a>."
"Copyright © 2016, 2018 Cognitive Class. This notebook and its source code are released under the terms of the <a href=\"https://bigdatauniversity.com/mit-license/\" rel=\"noopener noreferrer\" target=\"_blank\">MIT License</a>."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2 with Spark 2.0",
"display_name": "Python 2 with Spark 2.1",
"language": "python",
"name": "python2-spark20"
"name": "python2-spark21"
},
"language_info": {
"codemirror_mode": {
Expand Down
12,203 changes: 12,132 additions & 71 deletions Cloud/Archive/Access+MySQL+with+Python.html
100644 → 100755

Large diffs are not rendered by default.

38 changes: 23 additions & 15 deletions Cloud/Archive/Access+MySQL+with+Python.ipynb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"\n",
"This notebook shows how to access a MySQL database when using Python.\n",
"\n",
"This notebook runs on Python with Spark 2.0.\n",
"\n",
"## Table of contents\n",
"\n",
"1. [Setup](#Setup) \n",
Expand Down Expand Up @@ -37,18 +39,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: MySQL-python in /usr/local/src/bluemix_jupyter_bundle.v52/notebook/lib/python2.7/site-packages\r\n"
]
}
],
"source": [
"!pip install MySQL-python --user"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {
"collapsed": true
},
Expand Down Expand Up @@ -95,7 +103,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -117,7 +125,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -138,7 +146,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -165,7 +173,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -185,7 +193,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -252,9 +260,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2 with Spark 1.6",
"display_name": "Python 2 with Spark 2.0",
"language": "python",
"name": "python2"
"name": "python2-spark20"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -270,5 +278,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
}
"nbformat_minor": 1
}
10 changes: 5 additions & 5 deletions Cloud/Archive/Access+MySQL+with+R.html
Original file line number Diff line number Diff line change
Expand Up @@ -12632,11 +12632,11 @@ <h2 id="Identify-and-enter-the-database-connection-credentials">Identify and ent
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-r"><pre><span class="c1">#Enter the values for you database connection</span>
dsn_database <span class="o">=</span> <span class="s">&quot;test_db&quot;</span> <span class="c1"># for example &quot;BLUDB&quot;</span>
dsn_hostname <span class="o">=</span> <span class="s">&quot;bluemix-sandbox-dal-9-portal.0.dblayer.com&quot;</span> <span class="c1"># for example &quot;mydbinstance.cz6pjylrdjko.us-east-1.rds.amazonaws.com&quot;</span>
dsn_port <span class="o">=</span> <span class="m">28416</span> <span class="c1"># for example 3306 without quotation marks</span>
dsn_uid <span class="o">=</span> <span class="s">&quot;admin&quot;</span> <span class="c1"># for example &quot;user1&quot;</span>
dsn_pwd <span class="o">=</span> <span class="s">&quot;JZZKPRKLGGWPUNLL&quot;</span> <span class="c1"># for example &quot;7dBZ3jWt9xN6$o0JiX!m&quot;</span>
dsn_database <span class="o">=</span> <span class="s">&quot; &quot;</span> <span class="c1"># for example &quot;BLUDB&quot;</span>
dsn_hostname <span class="o">=</span> <span class="s">&quot; &quot;</span> <span class="c1"># for example &quot;mydbinstance.cz6pjylrdjko.us-east-1.rds.amazonaws.com&quot;</span>
dsn_port <span class="o">=</span> <span class="c1"># for example 3306 without quotation marks</span>
dsn_uid <span class="o">=</span> <span class="s">&quot; &quot;</span> <span class="c1"># for example &quot;user1&quot;</span>
dsn_pwd <span class="o">=</span> <span class="s">&quot; &quot;</span> <span class="c1"># for example &quot;7dBZ3jWt9xN6$o0JiX!m&quot;</span>
</pre></div>

</div>
Expand Down
10 changes: 5 additions & 5 deletions Cloud/Archive/Access+MySQL+with+R.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@
"outputs": [],
"source": [
"#Enter the values for you database connection\n",
"dsn_database = \"test_db\" # for example \"BLUDB\"\n",
"dsn_hostname = \"bluemix-sandbox-dal-9-portal.0.dblayer.com\" # for example \"mydbinstance.cz6pjylrdjko.us-east-1.rds.amazonaws.com\"\n",
"dsn_port = 28416 # for example 3306 without quotation marks\n",
"dsn_uid = \"admin\" # for example \"user1\"\n",
"dsn_pwd = \"JZZKPRKLGGWPUNLL\" # for example \"7dBZ3jWt9xN6$o0JiX!m\""
"dsn_database = \" \" # for example \"BLUDB\"\n",
"dsn_hostname = \" \" # for example \"mydbinstance.cz6pjylrdjko.us-east-1.rds.amazonaws.com\"\n",
"dsn_port = # for example 3306 without quotation marks\n",
"dsn_uid = \" \" # for example \"user1\"\n",
"dsn_pwd = \" \" # for example \"7dBZ3jWt9xN6$o0JiX!m\""
]
},
{
Expand Down
Loading