def setup(): sqlmagic = SqlMagic(shell=ip) ip.register_magics(sqlmagic) creator = """ DROP TABLE IF EXISTS manycoltbl; CREATE TABLE manycoltbl (name TEXT, y1 REAL, y2 REAL, name2 TEXT, y3 INT); INSERT INTO manycoltbl VALUES ('r1-txt1', 1.01, 1.02, 'r1-txt2', 1.04); INSERT INTO manycoltbl VALUES ('r2-txt1', 2.01, 2.02, 'r2-txt2', 2.04); INSERT INTO manycoltbl VALUES ('r3-txt1', 3.01, 3.02, 'r3-txt2', 3.04); """ for qry in creator.split(";"): sql_env.query(qry)
def setup(): sqlmagic = SqlMagic(shell=ip) ip.register_magics(sqlmagic)