=-----------------------------------------=
=-----------------------------------------=
_______ _______ ___ _______ ___ ___
| _ | _ | | | _ | Y )
| 1___|. | |. | |. | |. 1 /
|____ |. | |. |___|. | |. _ \
|: 1 |: 1 |: 1 |: 1 |: | \
|::.. . |::.. |::.. . |::.. . |::.| . )
`-------`----|:.`-------`-------`--- ---'
`--'
=-----------------------------------------=
SQL Orientated Kernels for Jupyter Notebook
=-----------------------------------------=
- | sqlite | mysql | postgres | oracle | -
- | videos | news | -
=-----------------------------------------=
-- oracle db kernel for jupyter notebook
=-----------------------------------------=
-- howto install
-- howto change oracle db connection
-- howto save oracle db connection info
-- howto load oracle db connection info
-- howto save query result to csv
-- howto change cell result output type
=-----------------------------------------=
-- howto install
pip install --upgrade sqlo-kernel
sqlok_install
-- optional:
pip install --upgrade nbtermix
nbtermix --kernel sqlok
=-----------------------------------------=
-- howto change oracle db connection
to open different oracle db connection use
--% dbcon:constr
on the beginning of the cell
where constr consists of string e.g.:
{
"host": "localhost",
"port": "1521",
"database": "xe",
"user": "user",
"password": "",
}
the string has to be specified on
one line and has to be preceded by:
--% dbcon:(oneliner constr)
Alternatively You can place the:
sqlok_conn.json
file in the working directory containg
above information on one line
and then load it using
--% cload
(see below)
=-----------------------------------------=
-- howto save oracle db connection info
put following magick on a line:
--% csave
it will save the current connection to the
sqlok_conn.json
file
=-----------------------------------------=
-- howto load oracle db connection info
put following magick on a line:
--% cload
it will load the current connection from
sqlok_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
=-----------------------------------------=