Feldera dialect plugin for SQLGlot.
This package keeps the Feldera dialect outside SQLGlot core and registers it through SQLGlot's dialect plugin entry point system, so feldera becomes available as a normal SQLGlot dialect after installation.
pip install sqlglot-feldera-pluginAfter installation, the feldera dialect is available automatically in SQLGlot with no extra imports:
import sqlglot
sqlglot.parse_one("SHOW TABLES", read="feldera").sql(dialect="feldera")
# -> SHOW TABLES
sqlglot.transpile("SELECT 1 MINUS SELECT 2", read="feldera", write="postgres")[0]
# -> SELECT 1 EXCEPT SELECT 2
sqlglot.parse_one("DECLARE RECURSIVE VIEW v (id INT)", read="feldera").sql(dialect="feldera")
# -> DECLARE RECURSIVE VIEW v (id INT)The current plugin covers the Feldera syntax prototyped in the upstream SQLGlot branch, including:
SHOW TABLESEXPLAIN SELECT ...DECLARE RECURSIVE VIEWREMOVE FROM ... VALUES (...)- top-level
LATENESS ... - column constraints like
INTERNED,LATENESS, andWATERMARK CREATE LOCAL VIEWCREATE LINEAR AGGREGATE- Feldera type aliases such as
BOOL,INT2,BYTEA, andDATETIME - Feldera-specific generation for
EXCLUDE,COUNTIF,ARG_MAX,ARG_MIN, andSAFE_CAST
This plugin is focused on Feldera SQL parsing and generation inside SQLGlot. It is intended to cover the syntax needed for transpilation, formatting, and AST-based tooling. It is not coupled to any Feldera server runtime and does not attempt to validate server-side semantics beyond SQLGlot's normal parsing and generation model.
git clone <your-plugin-repo>
cd sqlglot-feldera-plugin
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytestThe repository includes a minimal GitHub Actions workflow that installs the package and runs the standalone test suite on pull requests and pushes.
Before publishing to GitHub or PyPI, update the placeholder URLs in pyproject.toml to point at your actual repository.
If you publish to PyPI, the typical flow is:
python -m pip install build
python -m build
python -m pip install twine
python -m twine upload dist/*src/sqlglot_feldera/: plugin packagetests/: standalone plugin tests
This package is meant to live in a standalone repository rather than inside the SQLGlot repository. That keeps ownership, release cadence, compatibility policy, and issue triage with the plugin maintainer.