Skip to content

Commit b66f57d

Browse files
refine ext. description, features list, duckdb extensions, examples, demo data and other sections in docs
1 parent dd16b4f commit b66f57d

File tree

1 file changed

+37
-27
lines changed

1 file changed

+37
-27
lines changed

README.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@
66
<a href='https://ko-fi.com/F1F812DLR' target='_blank' title='support: https://ko-fi.com/dataPixy'>
77
<img height='24' style='border:0px;height:20px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=2' alt='https://ko-fi.com/dataPixy' /></a>
88

9-
[DuckDB SQL Tools](https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.duckdb-sql-tools) extension enables using [DuckDB](https://duckdb.org/) in [VSCode](https://code.visualstudio.com/) IDE with the popular [SQLTools](https://vscode-sqltools.mteixeira.dev/en/home/) VSCode extension and SQL query editing and processing tools.
9+
[DuckDB SQL Tools](https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.duckdb-sql-tools) extension adds [DuckDB](https://duckdb.org/) support to [VSCode](https://code.visualstudio.com/) IDE, and provides database schema and SQL query API and user interfaces for the popular [SQLTools](https://vscode-sqltools.mteixeira.dev/en/home/) extension, SQL query editor, SQL language server, and data processing tools.
1010

1111
![DuckDB SQL Tools](https://github.com/RandomFractals/duckdb-sql-tools/blob/main/docs/images/duckdb-sql-tools.gif?raw=true)
1212

1313
# Features
1414

15-
[DuckDB](https://duckdb.org/docs/) is an in-process SQL [OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing) database management system that uses vecotrized data engine for optimized analytics and parallel query processing with extensive SQL support and direct `Parquet` and `CSV` querying capabilites.
15+
[DuckDB](https://duckdb.org/docs/) is an in-process SQL [OLAP](https://en.wikipedia.org/wiki/Online_analytical_processing) database management system that uses vecotrized data engine for optimized analytics and parallel query processing with extensive SQL support and direct `Parquet` and `CSV` data loading and query capabilites for local and remote data files.
1616

17-
[DuckDB SQL Tools](https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.duckdb-sql-tools) extension adds the following capabilities to VSCode IDE to work with DuckDB instances:
17+
[DuckDB SQL Tools](https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.duckdb-sql-tools) extension adds the following capabilities to VSCode IDE for working with DuckDB instances:
1818

19-
- Connect to a local DuckDB instance
20-
- Create in-memory DuckDB instance
21-
- View DuckDB tables, columns, and views
22-
- Run SQL queries on open DuckDB instances
23-
- Attach SQLite database files to in-memory DuckDB instances
24-
- Query remote `CSV` and `Parquet` data files using [DuckDB HTTPFS](https://duckdb.org/docs/extensions/httpfs.html) extension and create in-memory DuckDB tables from remote data results
25-
- Create named SQL query Bookmarks
26-
- View SQL Query History
19+
- **Connect** to a local DuckDB instance
20+
- **Create** new in-memory DuckDB instance
21+
- **View** DuckDB tables, columns, and views
22+
- **Run** SQL queries on open DuckDB connections
23+
- **Attach** SQLite database files to in-memory DuckDB instances
24+
- **Query** remote `CSV` and `Parquet` data files with [DuckDB HTTPFS](https://duckdb.org/docs/extensions/httpfs.html) extension
25+
- **Create** in-memory DuckDB tables from remote data sources and query results
26+
- **Manage** DuckDB connections in SQLTools Database Explorer
27+
- **Autocomplete** SQL keywords, table names, column names, and view names on open database connections in VSCode SQL editor
28+
- **Save** named SQL query Bookmarks
29+
- **Use** SQL Query History
30+
- **Export** SQL query results in `CSV` and `JSON` data formats
2731

2832
See [SQLTools documentation](https://vscode-sqltools.mteixeira.dev/en/home/) for a comprehensive list of SQLTools extension features contributed to VSCode IDE.
2933

@@ -39,9 +43,9 @@ Users of [VSCodium](https://vscodium.com/) and other VSCode-based IDEs can insta
3943

4044
# DuckDB Extensions
4145

42-
DuckDB egnine also provides a number of [Extensions](https://duckdb.org/docs/extensions/overview) you can install and load to work with remote `CSV` and `Parquet` data files over [HTTPFS](https://duckdb.org/docs/extensions/httpfs), enable [Full Text Search](https://duckdb.org/docs/extensions/full_text_search), attach SQLite database with [SQLite Scanner](https://duckdb.org/docs/extensions/sqlite_scanner), or attach Postgres database instance with [Postgres Scanner](https://duckdb.org/docs/extensions/postgres_scanner).
46+
DuckDB egnine also provides a number of [Extensions](https://duckdb.org/docs/extensions/overview) you can install and load to work with remote `CSV` and `Parquet` data files over [HTTPFS](https://duckdb.org/docs/extensions/httpfs), enable [Full Text Search](https://duckdb.org/docs/extensions/full_text_search), attach [SQLite](https://sqlite.org/about.html) database with [SQLite Scanner](https://duckdb.org/docs/extensions/sqlite_scanner), or attach [PostgreSQL](https://www.postgresql.org/about/) database instance with DuckDB [Postgres Scanner](https://duckdb.org/docs/extensions/postgres_scanner).
4347

44-
You can check the list of core and installed DuckDB extensions by running the following SQL query on an open database instance:
48+
You can check the list of core and installed DuckDB extensions by running the following SQL query on an open database connection:
4549

4650
```sql
4751
select * from duckdb_extensions();
@@ -51,24 +55,28 @@ select * from duckdb_extensions();
5155

5256
## DuckDB HTTPFS
5357

54-
DuckDB SQL Tools VSCode extension installs and loads [HTTPFS](https://duckdb.org/docs/extensions/httpfs) DuckDB extension by default for all the open DuckDB instances. You can add other [DuckDB Extensions](https://duckdb.org/docs/extensions/overview) to an open database instance by using [`INSTALL` and `LOAD`](https://duckdb.org/docs/extensions/overview#remote-installation) extension SQL statements.
58+
DuckDB SQL Tools VSCode extension installs and loads [HTTPFS](https://duckdb.org/docs/extensions/httpfs) DuckDB extension by default for all the open database instances. You can add other [DuckDB Extensions](https://duckdb.org/docs/extensions/overview) to an open database instance by running [`INSTALL` and `LOAD`](https://duckdb.org/docs/extensions/overview#remote-installation) extension SQL statements.
5559

56-
Bellow is an example of loading reported Chicago crimes data into in-memory DuckDB instance from a `.parquet` data file hosted in our [Chicago Crimes](https://github.com/RandomFractals/chicago-crimes) data and analytical tools demo Github repository. This example uses implicitly loaded DuckDB HTTPFS extension to query reported Chicago crimes parquet data file with over 210K recorded crime reports, creates a `CrimeReports` table in DuckDB `:memory:` instance from loaded parquet data results, and queries imported data:
60+
Example of loading trimmed down Chicago crimes data reported in 2022 into an in-memory DuckDB instance from a `.parquet` data file hosted in our [Chicago Crimes](https://github.com/RandomFractals/chicago-crimes) data and analytical tools demo Github repository:
5761

5862
![DuckDB SQL Tools HTTPFS](https://github.com/RandomFractals/duckdb-sql-tools/blob/main/docs/images/duckdb-sql-tools-httpfs-data-load.gif?raw=true)
5963

64+
This example uses implicitly loaded DuckDB HTTPFS extension to query reported Chicago crimes parquet data file with over 210K recorded crime reports, creates a `CrimeReports` table in a new DuckDB `:memory:` instance from remote parquet data file, and queries imported data.
65+
6066
## DuckDB SQLite Scanner
6167

62-
Use the following SQL statements to add [SQLite Scanner](https://duckdb.org/docs/extensions/sqlite_scanner) extension to in-memory DuckDB instance:
68+
[SQLite](https://sqlite.org/about.html) database users can use DuckDB SQL Tools VSCode extension and DuckDB [SQLite Scanner](https://duckdb.org/docs/extensions/sqlite_scanner) extension to add data from SQLite database to in-memory DuckDB instance.
69+
70+
Run the following SQL statements to add SQLite Scanner DuckDB extension to an open database connection:
6371

6472
```sql
6573
INSTALL sqlite;
6674
LOAD sqlite;
6775
```
6876

69-
With the loaded SQLite Scanner extension you can attach SQLite database to DuckDB database instance. Attached SQLite database tables will show up as views in DuckDB instance.
77+
With the loaded SQLite Scanner DuckDB extension you can attach SQLite database file to a DuckDB database instance. Attached SQLite database tables will show up as views in DuckDB instance.
7078

71-
Use the following SQL `CALL` function to attach SQLite database instance:
79+
Run the following SQL `CALL` function to attach SQLite database instance:
7280

7381
```sql
7482
CALL sqlite_attach('E:\\projects\\data\\tools\\duckdb-tools\\data\\chinook\\sqlite\\chinook.sqlite');
@@ -80,19 +88,21 @@ CALL sqlite_attach('E:\\projects\\data\\tools\\duckdb-tools\\data\\chinook\\sqli
8088

8189
**Note**: DuckDB SQL Tools extension uses [DuckDB NodeJS Client API](https://duckdb.org/docs/api/nodejs/overview). In order to work with local data files, you need to specify full path to your local database or data files in SQL statements that reference local file paths.
8290

83-
Future versions of this extension might simplify local file path references by deducing absolute file path form the local DuckDB file connection string or open VSCode project workspace URI and replace relatIve database or data file references with the corresponding absolute path in an open VSCode project Workspace.
91+
Future versions of this extension might simplify local file path references by deducing absolute file path from the local DuckDB file connection string or open VSCode project workspace folder path, and replacing relatIve database or data file references with the corresponding absolute path in an open VSCode project workspace.
8492

85-
Also, note in the `sqlite_attach` SQL call statement above we are escaping `\` file path delimiters on Windows OS by using `\\` characters sequence.
93+
Also, note in the `sqlite_attach()` SQL function call statement above we are escaping `\` file path delimiters on Windows OS by using `\\` characters sequence.
8694

8795
# Demo Data
8896

89-
DuckDB SQL Tools extension github repository contains sample [/data](https://github.com/RandomFractals/duckdb-sql-tools/tree/main/data/chinook/duckdb) folder with `chinook.duckdb` and `chinook.sqlite` database files, csv, json and parquet data files, and some test SQL queries you can try running on this well-known sample database wih our VSCode extension.
97+
DuckDB SQL Tools extension documentation repository contains sample [/data](https://github.com/RandomFractals/sql-duckdb-tools/tree/main/data/chinook/duckdb) folder with [`chinook.duckdb`](https://github.com/RandomFractals/duckdb-sql-tools/blob/main/data/chinook/duckdb/chinook.duckdb) and [`chinook.sqlite`](https://github.com/RandomFractals/duckdb-sql-tools/blob/main/data/chinook/sqlite/chinook.sqlite) database files, csv, json and parquet data files you can download to get started using DuckDB with our SQL Tools VSCode extension.
98+
99+
The [cninook/duckdb](https://github.com/RandomFractals/duckdb-sql-tools/tree/main/data/chinook/duckdb) demo data folder also has sample SQL query files you try running on this well-known sample database with our VSCode extension.
90100

91101
![DuckDB SQL Tools Demo Data](https://github.com/RandomFractals/duckdb-sql-tools/blob/main/docs/images/duckdb-sql-tools-data.png?raw=true)
92102

93103
# Limitations
94104

95-
Due to the limited time and minimal development effort invested into building this free trial DuckDB SQL Tools extension, our first Preview alpha version of this extension comes with the following known limitations and supported usage scenarios.
105+
Due to the limited time and minimal development effort invested into building this Free Trial DuckDB SQL Tools extension, our first Preview alpha version of this extension comes with the following known limitations and supported usage scenarios.
96106

97107
## DuckDB Storage
98108

@@ -108,9 +118,9 @@ Future paid Premium and/or Pro versions of this extension might provide write ca
108118

109119
## In-Memory DuckDB
110120

111-
Meanwhile, you can experiment with writable `:memory:` DuckDB instances in this DuckDB SQL Tools Preview extension version. In-Memory DuckDB instances function similar to [In-Memory SQLite Databases](https://www.sqlite.org/inmemorydb.html). You can use [DuckDB Import Data](https://duckdb.org/docs/data/overview) and [Atach](https://duckdb.org/docs/sql/statements/attach) features available via DuckDB SQL statments, and use [Export Database](https://duckdb.org/docs/sql/statements/export) SQL statements to export created in-memory DuckDB instances.
121+
Meanwhile, you can experiment with writable `:memory:` DuckDB instances in this DuckDB SQL Tools Preview extension version. In-Memory DuckDB instances function similar to [In-Memory SQLite Databases](https://www.sqlite.org/inmemorydb.html). You can use [DuckDB Import Data](https://duckdb.org/docs/data/overview) and [Atach](https://duckdb.org/docs/sql/statements/attach) features available via DuckDB SQL statements, and use [Export Database](https://duckdb.org/docs/sql/statements/export) SQL statements to export created in-memory DuckDB instances.
112122

113-
DuckDB SQL Tools extension lets you create in-memory database instances by specifying `:memory:` in the Database File field of the new DuckDB connection in SQLTools Connection Assistant as demonstrated in DuckDB HTTPFS and SQLite Scanner extension usage examples above.
123+
DuckDB SQL Tools extension lets you create in-memory database instances by specifying `:memory:` keyword in the Database File field of the new DuckDB connection in SQLTools Connection Assistant as demonstrated in DuckDB HTTPFS and SQLite Scanner extension usage examples above.
114124

115125
**Note**: **only** in-memory DuckDB database instances are open in `read/write` mode in this DuckDB SQL Tools extension Preview release to avoid DuckDB instance file access locking.
116126

@@ -143,14 +153,14 @@ The following [SQLTools Settings](https://vscode-sqltools.mteixeira.dev/en/setti
143153
| ```"sqltools.disableNodeDetectNotifications": true``` | Disable Node runtime detection notifications after initial SQLTools extension installation to prevent Node runtime information message display on every new VSCode session start. |
144154
| ```"sqltools.autoOpenSessionFiles": false``` | Prevent auto open of new session SQL editor instance after connecting to the databaase instance. |
145155
| ```"sqltools.results.limit": 10000``` | Maximum number of records to return in results. SQLTools defaults to displaying only 50 records in query results view. Changing this limit setting to 1000 or 10000 will show more data rows to inspect in result views. |
146-
| ```"sqltools.results.location": "current"``` | Defines the edigor group to use for result table views. SQLTools displays all results in the next editor group to show results on the side next to the active SQL query editor. Changing this setting to `current` will display results in the same editor group and display more result colulmns. |
156+
| ```"sqltools.results.location": "current"``` | Defines the editor group to use for result table views. SQLTools displays all results in the next editor group to show results on the side next to the active SQL query editor. Changing this setting to `current` will display results in the same editor group and display more result columns. |
147157

148158
# Feedback
149159

150-
Use [DuckDB SQL Tools Github Discussions](https://github.com/RandomFractals/duckdb-sql-tools/discussions) portal to submit your feedback, share examples of how you are using this VSCode extension, or request new trivial and premium features. Our aim is to make DuckDB more accessible and easier to use in VSCode IDE and Terminal.
160+
Use [DuckDB SQL Tools Github Discussions](https://github.com/RandomFractals/duckdb-sql-tools/discussions) portal to submit your feedback, share examples of how you are using this VSCode extension, or request new trivial and premium features. Our goal with this extension is to make DuckDB more accessible and easier to use in VSCode IDE and Terminal.
151161

152162
# Support
153163

154-
Become a [Fan and Sponsor](https://github.com/sponsors/RandomFractals/sponsorships?sponsor=RandomFractals&tier_id=18883) our dev efforts on this and other [Random Fractals, Inc. code and data viz extensions](https://marketplace.visualstudio.com/publishers/RandomFractalsInc) if you find them useful, educational, or enhancing your daily dataViz dev code workflows and exploratory data analysis:
164+
Become a [Fan and Sponsor](https://github.com/sponsors/RandomFractals/sponsorships?sponsor=RandomFractals&tier_id=18883) our dev efforts on this and other [Random Fractals, Inc. code and data viz extensions](https://marketplace.visualstudio.com/publishers/RandomFractalsInc) if you find them useful, educational, or enhancing your daily dataViz dev code workflows and exploratory data analysis experience.
155165

156166
☕️ https://ko-fi.com/dataPixy 💖 https://github.com/sponsors/RandomFractals

0 commit comments

Comments
 (0)