Public
Edited
Aug 11, 2023
Insert cell
Insert cell
Insert cell
data = `CREATE TABLE user(
id INT PRIMARY KEY NOT NULL,
first_name VARCHAR(100),
last_name VARCHAR(100)
)`
Insert cell
data.match("([a-z_]+ )[A-Z 0-9()]*,?[ \r\n]*")
Insert cell
ast = JSON.stringify(parser.astify(sql), null, 2)
Insert cell
parser = new sqlParser.default.Parser()
Insert cell
Insert cell
Insert cell
sqlParser = import("https://cdn.skypack.dev/node-sql-parser@4.9.0?min")
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