Published
Edited
Jul 29, 2022
2 forks
Importers
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
db = FileAttachment('chinook.db').sqlite()
Insert cell
Insert cell
Insert cell
db
SELECT * FROM sqlite_schema
WHERE type ='table' AND name NOT LIKE 'sqlite_%';
Insert cell
Insert cell
Insert cell
db
SELECT sqlite_master.name as from_table,
fk_info.[from] as from_column,
fk_info.[table] as to_table,
fk_info.[to] as to_column
FROM sqlite_master
JOIN pragma_foreign_key_list(sqlite_master.name) as fk_info
Insert cell
Insert cell
sqliteERDiagram(db)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
tableStatementTree = objectTree(tableStatementAST ? tableStatementAST.statement[0] : {})
Insert cell
Insert cell
Insert cell
duckDB = createDuckDB(db)
Insert cell
duckDB
show tables
Insert cell
duckDB.describeTables()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
duckDBTablesDiagram = duckDBDiagram(duckDB)
Insert cell
Insert cell
duckDB
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more