DuckDB SQL ToolsDuckDB SQL Tools Preview extension adds basic DuckDB SQL support to VS Code IDE. This DuckDB VS Code extension provides DuckDB connections and main database schema tree view, SQL query API and user interfaces for the popular SQL Tools extension, SQL query editor, SQL language server, and data processing tools. FeaturesDuckDB is an in-process SQL OLAP database management system that uses vectorized data engine for optimized analytics and parallel query processing with extensive SQL support and direct DuckDB SQL Tools Preview extension v1.6.0 adds the following basic DuckDB SQL capabilities to VS Code IDE for working with DuckDB instances:
See SQL Tools documentation for a comprehensive list of SQL Tools extension features contributed to VS Code IDE. InstallationInstall DuckDB SQL Tools Preview extension from VS Code marketplace in your browser by clicking on Install button in the extension info page header. Alternatively, you can install this extension directly in VS Code IDE from Extensions tab ( Users of VS Codium and other VS Code based IDEs can install DuckDB SQL Tools Preview extension using Note: DuckDB SQL Tools use DuckDB Node.js API and require a local Node.js installation to query DuckDB instances. Download and install Node.js from the official Node.js downloads page. Node.js is used as a local web server to host local data and DuckDB files. Node.js will install npm tool we use to install We use Node.js DuckDB library instead of the limited DuckDB WASM browser JS library other similar DuckDB data tools use to enable faster data imports and loading via multi-threaded VS Code SQL and Pro Data ToolsThe following sections provide a summary of the popular SQL Tools VS Code extension, database drivers, our public Random Fractals Inc. Data Tools extensions, and new premium Pro Data Tools available to our Pro sponsors on GitHub. SQL ToolsSQL Tools VS Code extension provides connections to many commonly used databases, and includes database connection management tree view with database schema info and objects display, basic table viewer for SQL query results display, and SQL language server for editing SQL in VS Code with SQL syntax highlighting and auto-completion. SQL Tools DriversSQL Tools support many popular databases via the official and community database drivers you can install and use in VS Code IDE from VS Code Marketplace SQL Tools drivers page. Random Fractals Data ToolsRandom Fractals Inc. Data Tools 🛠️ is a collection of public data visualization extensions, data viewers, VS Code Notebook renderers, and code snippets for devs and data scientists using VS Code IDE, published under our Random Fractals Inc. ☂️ org. Pro Data ToolsPro Data Tools is our new Premium set of SQL and PRQL Code Lenses and Data Viewers created for our monthly Pro sponsors on GitHub to enhance SQL development and SQL statements execution runtime workflow in VS Code IDE, connected to the different database management systems via SQL Tools extension, database plugins, and SQL Tools drivers. DuckDB Pro ToolsPro Data Tools include DuckDB Pro Tools extension that adds advanced DuckDB connection features and support to VSCode IDE, and provides database schemas display, DuckDB extensions and settings views, information schema and catalog views, SQL query API and user interfaces integrated with the popular SQL Tools extension, SQL query editor, SQL language server, and VS Code data processing tools. The latest version of DuckDB Pro Tools extension adds the following capabilities to VS Code IDE for working with DuckDB v0.10 instances:
DuckDB Pro Tools View CommandsSQLite Pro ToolsPro Data Tools VS Code extensions also include SQLite Pro Tools. SQLite Pro Tools provide over a dozen of common SQLite database shortcut Commands, display table column data type and primary key indicators, SQLite database Indexes, Modules, Configuration Settings and Functions. PRQL Pro ToolsOur Pro sponsors on github also get access to the premium PRQL Pro Tools VS Code extension. The initial private beta release of PRQL Pro Tools comes with custom PRQL Code Lens SQL Tools plugin that allows you to run PRQL queries for the supported PRQL target SQL dialects directly using any of the supported SQL Tools extension drivers for the different database management systems. Markdown SQL Pro ToolsRecently released private beta of Markdown SQL Pro Tools add custom SQL Code Lenses to SQL code blocks in standard SQL and various markdown documents in VS Code IDE. The provided SQL Code Lenses include top-level SQL and markdown document Our SQL Code Lenses integrate with the popular SQL Tools Connections manager, supported SQL Tools drivers, and query results viewer to execute SQL directly on any of the supported SQL Tools database management systems and view results. Markdodown SQL Pro Tools extension is available under the new Markdown Sql Pro Tools monthly sponsor subscription on GitHub and also includes access to the DuckDB Pro SQL Tools plugin and PRQL Code Lens extension from our Premium Pro Data Tools extensions pack. Data Notebook Pro ToolsThe new Data Notebook Pro Tools extension from our Premium Pro Data Tools extensions pack will be released later this year for our Pro sponsors on GitHub. Data Notebook Pro extension integrates SQL Tools connections, supported database management systems, our Data Table Renderers and VS Code Jupyter Notebook user interface to view and run SQL queries from Data Notebook SQL QuerySimple example of running SQL query with the new Data Notebook Pro Tools extension: Data Notebook Output RenderingUsing different Data Table Renderers in the Data Notebook created from SQL document with multiple SQL queries: 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 VS Code extension installs and loads HTTPFS DuckDB extension by default for all the open database connections. You can add other DuckDB Extensions to the active DuckDB connection 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 VS Code 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 VS Code project workspace folder path, and replacing relative database or data file references with the corresponding absolute path in an open VS Code 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 can try running on this well-known sample database with our VS Code extension. LimitationsDue to the limited time and minimal development effort invested into building this Free Trial DuckDB SQL Tools extension, our Preview version of this extension comes with the following known limitations and supported usage scenarios. DuckDB StorageDuckDB SQL Tools Preview v1.6.0 release of this extension supports only local database instances created with DuckDB v0.10.2 engine. Database instances and files created with older minor 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 You can use prior The Premium DuckDB Pro Tools extension version, available to our Pro sponsors on GitHub, supports DuckDB v0.10.2 files with many advanced SQL Tools features, and will be updated to support the latest DuckDB v1.0.0 storage format and features soon. Read-Only DuckDBDuckDB SQL Tools Preview extension opens The Premium DuckDB Pro Tools extension version, available to our Pro sponsors on GitHub, supports opening In-Memory DuckDBYou can experiment with writable DuckDB SQL Tools Preview extension lets you create in-memory database instances by specifying Note: only Sign up for the Premium Pro Data Tools on GitHub to get access to the DuckDB Pro Tools and work with the latest versions of DuckDB files in read and write modes. ConfigurationSQL Tools extension provides many configuration Settings users can toggle to change database connection and tree view display options, sql formatting, and results display. The following SQL Tools 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 your User Settings in VS Code by navigating to
FeedbackPlease use our public DuckDB SQL Tools GitHub Discussions portal to submit your feedback, share examples of how you are using DuckDB SQL Tools VS Code extension, or request new trivial and premium features. Our goal with this extension and DuckDB Pro Tools is to make DuckDB more accessible and easier to use in VS Code IDE. SupportBecome a Fan or a Pro Sponsor of our work on this and other Random Fractals, Inc. code and data viz extensions if you find them useful, educational, or enhancing your daily dev workflows and exploratory data analysis experience in VS Code IDE. |