Skip to content

PRQL/prql-jetbrains

Repository files navigation

prql-jetbrains-plugin

PRQL plugin allows you to edit PRQL in JetBrains IDEs.

Features:

  • Syntax parsing
  • Code highlight
  • Code format
  • SQL injection
  • Code completion
  • SQL transpile support
  • SQL Target dialect support from SQL dialects
  • Execute PRQL by JDBC Console
  • Sync transpiled SQL from @PRQL to @Query

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "prql" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

Type System

  • primitives: int, float, bool, text, date, time and timestamp
  • text: "hello world", 'hello', """I said "hello world"!""",
  • date/time/timestamp: @2022-12-31, @2020-01-01T13:19:55-08:00, @16:54:32
  • range: 50..100
  • array: []
  • tuple: {}
  • function: let add a b -> a+b

String

  • F-strings: Build up a new string from a set of columns or values
  • S-strings: Insert SQL statements directly into the query. Use when PRQL doesn’t have an equivalent facility.
  • R-strings: R-strings handle escape characters without special treatment:

Todo

  • Column code completion

References