DUQL vs PRQL

DUQL is a powerful, YAML-based query language that builds upon the strengths of PRQL (Pipelined Relational Query Language) while offering enhanced readability, flexibility, and ease of use. This document aims to provide a detailed comparison between DUQL and PRQL, highlighting the key differences and advantages of DUQL.

Terminology Mapping

PRQL TermDUQL TermDescription

from

dataset

Specifies the data source

select

select

Chooses columns to include in the output

filter

filter

Selects rows based on conditions

derive

generate

Creates new columns or modifies existing ones

group

group

Groups by 1 or more columns

aggregate

summarize

Performs aggregation operations

sort

sort

Orders the results

take

take

Limits the number of rows returned

join

join

Combines data from multiple sources

window

window

Performs calculations across a set of rows

let

declare

Defines variables, functions, or reusable components

Key Advantages of DUQL over PRQL

  1. YAML-based Syntax: DUQL uses YAML, a human-friendly data serialization standard, making queries more readable and easier to write, especially for complex operations.

  2. Enhanced Readability: The structure of DUQL queries is more intuitive, with clear separation between different operations and improved formatting options.

  3. Simple Naming Conventions: DUQL uses intuitive naming conventions across its functions and operations that assist with understanding for users new to querying data.

  4. JSON Schemas: DUQL has well-defined JSON schema definitions for query structure and transforms, simplifying the creation of 'query builder' interfaces.

Last updated