Fugue SQL Antlr Parser

0.2.4 · active · verified Sun Apr 12

Fugue SQL Antlr Parser is an internal dependency of the Fugue project, providing the ANTLR4-based parsing capabilities for FugueSQL. It is not intended for direct use by end-users but is crucial for the SQL functionality within the Fugue ecosystem. The library has its own versioning, distinct from the main `fugue` package, with the current version being 0.2.4.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how Fugue-SQL is used, which in turn utilizes the `fugue-sql-antlr` parser internally. Users typically do not directly import or interact with `fugue-sql-antlr` itself, but rather use the `fsql` function from the main `fugue` project to execute SQL queries on various backends.

import pandas as pd
from fugue_sql import fsql

df = pd.DataFrame({"id": [1, 2, 3], "value": [10, 20, 30]})

# FugueSQL uses the fugue-sql-antlr parser internally
result_df = fsql("SELECT id, value * 2 AS doubled_value FROM df WHERE value > 15").run(df).as_pandas()

print(result_df)

view raw JSON →