| title | SQL shell |
|---|---|
| description | Query and manage FlareDB tables with the interactive SQL shell. |
Start the shell with:
flare sqlThe shell opens a flare> prompt and accepts standard SQL statements. End each statement with a semicolon, and it executes right away. Multi-line statements are supported continuation lines use the ... | prompt.
| Command | Description |
|---|---|
help |
Show help text. |
exit, quit |
Exit the shell. |
Create a table, insert rows, and query them back:
CREATE TABLE users (id INT, name STRING);
INSERT INTO users VALUES (1, 'Alice'), (2, 'Bob');
SELECT * FROM users;List the tables you have created:
SHOW TABLES;Tables you write from a Beam pipeline with FlareDB I/O appear here just like any other table. Query them by their fully qualified name, for example:
SELECT * FROM default.default.scores;For details on writing tables from a pipeline, see FlareDB I/O.