Who it is forA data engineer with existing Snowflake AI_FILTER queries who wants to run the same logic on their own GPU hardware.
The problemExisting AI SQL written for one warehouse dialect cannot run on a GPU-based engine without changes.
The outcomeThe same filter logic executed through Quail by setting the Snowflake dialect in session.sql.
What you need first
- Python 3.12
- An NVIDIA CUDA GPU from the supported list (for example H100 SXM)
- uv installed to run the pip install command
- A table of text rows (for example reviews with an id and a body column)
Steps
- Run
uv pip install quail-engineto install the package. - Register the source table with Quail.DocumentProvider.from_table(table, id_col="id").
- Copy your AI_FILTER query into a string and pass it to session.sql with the Snowflake dialect setting, using the dialect value your code expects.
- Call .collect() and compare the output with your Snowflake result on a small sample.
- If the dialect value is not accepted, switch to the BigQuery AI.IF form shown in the README. (inferred, check the README)
Prompt for your agent
Use the Python package quail-engine (import quail) from the repo fsdatalab/quail to run the Snowflake-style AI_FILTER query in <query_file> against the table <table_name>. Output the filtered rows. Verify that the output matches the Snowflake result for a sample of 10 rows.
Caveat. The README lists both dialects but does not show the exact dialect value string for Snowflake, so confirm it in the documentation before relying on it.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for fsdatalab/quail and "Run Snowflake AI_FILTER style queries on your own GPU"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer