Skip to content

robinaly/sql_kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A SQL Kernel for Jupyter

This package allows users to execute sql commands; one command per cell.

The package is heavily inspired by the greate packages ipython-sql and bash_kernel (some code was also taken from there).

Example Use

The first line has to be an SQLAlchemy connect string . For example, to connect to ab in-memory sqlite database, the first line should be:

In [1]: sqlite://
Out[1]: Connected

Afterwards, you can use standard SQL commands to fill the database with values and retrieve them.

In [2]: CREATE TABLE X (firstname VARCHAR(20), lastname VARCHAR(20))
In [3]: INSERT INTO X VALUES ("John", "Smith")
In [4]: INSERT INTO X VALUES ("John", "Doe")
In [5]: SELECT * FROM X
Out[5]: 
+-----------+----------+
| firstname | lastname |
+-----------+----------+
|    John   |  Smith   |
|    John   |   Doe    |
+-----------+----------+

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages