DuckDB SQL ToolsDuckDB SQL Tools extension adds DuckDB support to VSCode IDE, and provides database schema and SQL query API and user interfaces for the popular SQLTools extension, SQL query editor, SQL language server, and data processing tools. FeaturesDuckDB is an in-process SQL OLAP database management system that uses vecotrized data engine for optimized analytics and parallel query processing with extensive SQL support and direct DuckDB SQL Tools extension adds the following capabilities to VSCode IDE for working with DuckDB instances:
See SQLTools documentation for a comprehensive list of SQLTools extension features contributed to VSCode IDE. InstallationInstall DuckDB SQL Tools extension from VSCode marketplace in your browser by clicking on Install button in the extension info page header. Alternatively, you can install this extension directly in VSCode IDE from Extensions tab ( Users of VSCodium and other VSCode-based IDEs can install DuckDB SQL Tools extension using DuckDB ExtensionsDuckDB egnine also provides a number of Extensions you can install and load to work with remote You can check the list of core and installed DuckDB extensions by running the following SQL query on an open database connection:
DuckDB HTTPFSDuckDB SQL Tools VSCode extension installs and loads HTTPFS DuckDB extension by default for all the open database instances. You can add other DuckDB Extensions to an open database instance by running Example of loading trimmed down Chicago crimes data reported in 2022 into an in-memory DuckDB instance from a This example uses implicitly loaded DuckDB HTTPFS extension to query reported Chicago crimes parquet data file with over 210K recorded crime reports, creates a DuckDB SQLite ScannerSQLite database users can use DuckDB SQL Tools VSCode extension and DuckDB SQLite Scanner extension to add data from SQLite database to in-memory DuckDB instance. Run the following SQL statements to add SQLite Scanner DuckDB extension to an open database connection:
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. Run the following SQL
DuckDB File ReferencesNote: DuckDB SQL Tools extension uses DuckDB NodeJS Client API. 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. 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. Also, note in the Demo DataDuckDB SQL Tools extension documentation repository contains sample /data folder with The cninook/duckdb demo data folder also has sample SQL query files you try running on this well-known sample database with our VSCode extension. LimitationsDue 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. DuckDB StoragePreview release of this extension supports only local database instances created using DuckDB v0.6.1 engine. Database instances and files created with prior versions of DuckDB are not supported as they use different compression and storage formats and the structure of Use DuckDB CLI to export data from the older database file versions and create new Read-Only DuckDBAdditionaly, our first release opens Future paid Premium and/or Pro versions of this extension might provide write capabilities and better integration with DuckDB CLI in VSCode Terminal to our Github Pro Sponsors, depending on the popularity of this extension in VSCode marketplace, user feedback and requests you can post in our DuckDB SQL Tools Github Discussions, and users willing to pay for the development of Premium DuckDB Tools and additional Pro features. In-Memory DuckDBMeanwhile, you can experiment with writable DuckDB SQL Tools extension lets you create in-memory database instances by specifying Note: only in-memory DuckDB database instances are open in VSCode Memory LimitYou can adjust the amount of RAM allocated to VSCode IDE to enable opening large files and load more data into memory. Go to ConfigurationSQLTools extension provides many configuration Settings users can toggle to change database connection and tree view display options, sql formatting, and results display. The following SQLTools Settings were used while creating and testing this DuckDB SQL Tools extension and are recommended for working with DuckDB instances efficiently. We suggest you set these preferences in User Settings in VSCode by navigating to
FeedbackUse DuckDB SQL Tools Github 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. SupportBecome a Fan and Sponsor our dev efforts on this and other Random Fractals, Inc. code and data viz extensions if you find them useful, educational, or enhancing your daily dataViz dev code workflows and exploratory data analysis experience. ☕️ https://ko-fi.com/dataPixy 💖 https://github.com/sponsors/RandomFractals |