=-----------------------------------------= =-----------------------------------------= _______ _______ ___ _______ ___ ___ | _ | _ | | | _ | Y ) | 1___|. | |. | |. | |. 1 / |____ |. | |. |___|. | |. _ \ |: 1 |: 1 |: 1 |: 1 |: | \ |::.. . |::.. |::.. . |::.. . |::.| . ) `-------`----|:.`-------`-------`--- ---' `--' =-----------------------------------------= SQL Orientated Kernels for Jupyter Notebook =-----------------------------------------= - | sqlite | mysql | postgres | oracle | - - | videos | news | - =-----------------------------------------= -- sqlite kernel for jupyter notebook =-----------------------------------------= -- howto install -- howto change sqlite connection -- howto save sqlite connection info -- howto load sqlite connection info -- howto save query result to csv -- howto change cell result output type =-----------------------------------------= -- howto install pip install --upgrade sqli-kernel sqlik_install -- optional: pip install --upgrade nbtermix nbtermix --kernel sqlik =-----------------------------------------= -- howto change sqlite connection to open different sqlite connection use --% dbcon:constr on the beginning of the cell where constr consists of string e.g.: {"dbfile" : "filename.db"} the string has to be specified on one line and has to be preceded by: --% dbcon:(oneliner constr) Alternatively You can place the: sqlik_conn.json file in the working directory containg above information on one line and then load it using --% cload (see below) =-----------------------------------------= -- howto save sqlite connection info put following magick on a line: --% csave it will save the current connection to the sqlik_conn.json file =-----------------------------------------= -- howto load sqlite connection info put following magick on a line: --% cload it will load the current connection from sqlik_conn.json file =-----------------------------------------= -- howto save query result to csv put following magick on a line: --% dsave it will save last query result to csv e.g. --% dsave dummy will save last query result to dummy.csv =-----------------------------------------= -- howto change output type put following magick in a cell: --% otext to display cells result output in text mode put following magick in a cell: --% ohtml to display cells result output in html mode =-----------------------------------------= -- created using vi, gnu screen and debian =-----------------------------------------=