Skip to content

Commit 7479933

Browse files
authored
More sqlite-utils memory examples in README closes #294
1 parent 7e2dcbb commit 7479933

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Python CLI utility and library for manipulating SQLite databases.
1313
## Some feature highlights
1414

1515
- [Pipe JSON](https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-json-data) (or [CSV or TSV](https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-csv-or-tsv-data)) directly into a new SQLite database file, automatically creating a table with the appropriate schema
16+
- [Run in-memory SQL queries](https://sqlite-utils.datasette.io/en/stable/cli.html#querying-data-directly-using-an-in-memory-database), including joins, directly against data in CSV, TSV or JSON files and view the results.
1617
- [Configure SQLite full-text search](https://sqlite-utils.datasette.io/en/stable/cli.html#configuring-full-text-search) against your database tables and run search queries against them, ordered by relevance
1718
- Run [transformations against your tables](https://sqlite-utils.datasette.io/en/stable/cli.html#transforming-tables) to make schema changes that SQLite `ALTER TABLE` does not directly support, such as dropping columns
1819
- [Extract columns](https://sqlite-utils.datasette.io/en/stable/cli.html#extracting-columns-into-a-separate-table) into separate tables to better normalize your existing data
@@ -32,6 +33,14 @@ Or if you use [Homebrew](https://brew.sh/) for macOS:
3233

3334
Now you can do things with the CLI utility like this:
3435

36+
$ sqlite-utils memory dogs.csv "select * from t"
37+
[{"id": 1, "age": 4, "name": "Cleo"},
38+
{"id": 2, "age": 2, "name": "Pancakes"}]
39+
40+
$ sqlite-utils insert dogs.db dogs dogs.csv --csv
41+
[{"id": 1, "age": 4, "name": "Cleo"},
42+
{"id": 2, "age": 2, "name": "Pancakes"}]
43+
3544
$ sqlite-utils tables dogs.db --counts
3645
[{"table": "dogs", "count": 2}]
3746

0 commit comments

Comments
 (0)