Skip to content

Latest commit

Β 

History

History
92 lines (46 loc) Β· 8.46 KB

prql-tools.md

File metadata and controls

92 lines (46 loc) Β· 8.46 KB

PRQL Pro Tools

PRQL Pro Tools is a collection of custom PRQL extensions integrated with the popular SQL Tools database management system and plugins to use in VS Code IDE.

PRQL Code Lens

PRQL

PRQL is a modern language for transforming data. PRQL is database agnostic and compiles to many SQL dialects for the target database management system as described in PRQL Book.

PRQL Showcase

PRQL tools include PRQL VS Code extension that adds PRQL language support, SQL Preview and other PRQL related settings and features to work with it in VS Code IDE.

PRQL VS Code Extension

SQL Tools

SQL Tools provide connections to many commonly used databases in VS Code. SQL Tools come with many built-in database drivers and an extensive list of community drivers users can use to connect to the database management system of their choosing, view database objects in SQL Tools Connection Explorer, and run SQL queries.

SQL Tools Drivers

Most of the SQL Tools database drivers use the target database management system browser JavaScript API to connect to the local database server or remote database instances via SQL Tools Connection Assistant user interface:

SQL Tools Connection Assistant

Some of the SQL Tools extensions, such as SQLite and DuckDB Pro Tools require NodeJS installation and sqltools.useNodeRuntime setting enabled for tighter inegration of the native database api and access to the local file system to load and view file-based database instances using NodeJS server for the database files and local data files hosting runtime.

DuckDB Pro Tools Connection

PRQL Pro Tools Extension Pack

PRQL Pro Tools is a private beta collection of custom PRQL VS Code extensions for our monthly Pro supporters on github, and can be viewed as an extension pack to enhance PRQL development and runtime workflow connected to the different database management system via SQL Tools extension and database plugins.

PRQL Code Lens

The initial private beta release of PRQL Pro Tools comes with PRQL Code Lens extension that allows you to run PRQL queries for the supported PRQL target SQL dialects directly against any of the supported SQL Tools extensions and database management systems.

PRQL Code Lens

Supported Databases

You can explore SQL Tools drivers in VS Code Marketplace and install the corresponding database drivers depending on target database management system you intend to use with PRQL Code Lens and SQL Tools.

We recommend you install SQLite or DuckDB Pro Tools to get started.

Configuration

PRQL Code Lens uses the corresponding PRQL Settings and prql.target for the target database management system when creating SQL query to run at runtime.

See SQL Tools Settings documentation and specific SQL Tools driver settings to manage SQL query results display and other database specific settings. For example, DuckDB Pro Tools list some of them in the Configuration section.

Demo Data

DuckDB SQL Tools repository has sample /data folder you can use to download SQLite and DuckDB demo chinook database files and sample PRQL queries you can run.

Chinook DB Data and Queries

PRQL Pro Tools repository also has /data folder with sample employees database data files, schema and load SQL scripts, create-employees-duckdb.ipynb Jupyter notebook, and some PRQL query samples you can download, load and run with PRQL Code Lens. More chinook and employees database PRQL sample queries will be added later.

PRQL Query Examples

Base PRQL VScode extension has a few new PRQL examples that demo new PRQL compiler v0.6 features such as loop, case, func and using variables with let.

We also recently added a couple of GBIF dataset PRQL query examples to demo loading and querying remote public datasets hosted by AWS with PRQL Code Lens extension and DuckDB SQL Tools:

GBIF PRQL DuckDB Pro Tools Examples

PRQL Notebook

Future versions of PRQL Pro Tools will include custom PRQL Notebook extension integrated with SQL Tools extension, supported database management systems, our Data Table Renderers and VS Code Notebooks user interface to view and run PRQL queries from .prql file using Notebook UI:

PRQL Notebook

PRQL Terminal

We also plan to release a custom version of PRQL Terminal extension as part of the PRQL Pro Tools extension pack for our monthly Pro supporters later this year.

PRQL Terminal will have a walk-through to install prqlc CLI tools and will integrate it with the built-in VS Code File Manager and Terminal panel to run PRQL queries from the command line with VS Code commands, shortcuts, and .prql file context menus for the CLI fans.

PRQL Terminal

Installation and Support

You can get access to PRQL Pro Tools by becoming a Pro sponsor of our Pro Data Tools work on GitHub.

All Pro sponsors get invited as collaborators to our private Pro Data Tools repositories, and will be notified about the upcoming updates, new releases, additions, and new Data Notebook Pro extension we'll be releasing later this year.

Help us reach our goal of getting 20 Pro monthly sponsors on GitHub. πŸ™

πŸ’– https://github.com/sponsors/RandomFractals