Open ecrooks opened 5 years ago
I am receiving the exact same issue with Python 3.7.3 with Jupyter Labs running on Mac OS 10.14.4. Has anybody been able to resolve this issue?
The same for me, any solutions for the db2.ipynb issue?
I hope the latest version of db2.ipynb fixes this issue. Just working on adding new examples for Db2 11.5 which was just released as well as some small extensions to the command for dealing with JSON a little better (did I say I hate quotes in Db2....).
How can the width of the graph plot be increased.
The program uses the default values that Pandas dataframes uses. So under the covers, the code just calls the plot routine.
If you want to try changing the plot parameters, you can do the following:
answer = %sql select workdept, count(*) from employees group by workdept
answer.plot(kind='bar',figsize=(10,5))
So the answer
variable is just a pandas dataframe that you can manipulate using all of the plot functions available with that package. The figsize
parameter will make the plot larger.
NameError Traceback (most recent call last)
I've posted an updated version of the db2.ipynb file for you to try. What was the trap message associated with the line _settings["hostname"] = ....
Not sure it will solve this problem because I can't tell why it would fail on hostname! Anyway, I'm impressed that you managed to connect to a AS400 server since I have never tested against that platform. Hopefully we can figure out why this failed.
Thank you. It works now with the additional prompt. Enter the database connection details (Any empty value will cancel the connection) Enter the database name: as400 Enter the HOST IP address or symbolic name: as400 Enter the PORT number: 446 Is this a secure (SSL) port (y or n)n Enter Userid on the DB2 system: user Password [password]: ········ Connection successful.
Any possibility to add additional options or ability to do this?. Thank you! %sql set option commit = NONE, naming = SYS, datFmt = ISO, datSep = '-', dynUsrPrf = Owner dlyPrp = *YES ;
I believe those are AS400 specific options, correct? For commits, I do have %sql AUTOCOMMIT OFF or ON
but I am not aware how the other options would be used. The underlying driver (ibm_db) may allow some of these options. Is this something that is normally done on a connection string?
that's correct. Below is the snapshot for ODBC. I am using DB2 Connect. Yet to find equivalent options in DB2 Connect.
Not sure if below link will help.
https://github.com/ibmdb/python-ibmdb/issues/389#issuecomment-557719191
I'm running anaconda3 (Python 3.7.1 (default, Dec 14 2018, 19:28:38) [GCC 7.3.0]) on ubuntu, and trying to run the db2 extensions, I get:
I can connect to db2 just fine from the standard sql magic, but I can't run the db2 extensions. I followed the installation instructions. Is there anything I'm missing here?