{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "fsdatalab-quail--port-snowflake-ai-filter-queries",
 "repo": "fsdatalab/quail",
 "repo_url": "https://github.com/fsdatalab/quail",
 "repo_slug": "fsdatalab-quail",
 "title": "Run Snowflake AI_FILTER style queries on your own GPU",
 "page_title": "How to run Snowflake AI_FILTER style queries on your own GPU with Quail",
 "summary": "Reuse Snowflake-style AI_FILTER SQL with Quail's dialect support on local GPUs.",
 "who": "A data engineer with existing Snowflake AI_FILTER queries who wants to run the same logic on their own GPU hardware.",
 "problem": "Existing AI SQL written for one warehouse dialect cannot run on a GPU-based engine without changes.",
 "outcome": "The same filter logic executed through Quail by setting the Snowflake dialect in session.sql.",
 "steps": [
  "Run `uv pip install quail-engine` to 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)"
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "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.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "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)"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/fsdatalab-quail/port-snowflake-ai-filter-queries/",
 "md": "https://dedupedai.com/use-cases/fsdatalab-quail/port-snowflake-ai-filter-queries/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/fsdatalab-quail--port-snowflake-ai-filter-queries.json",
 "api_version": "v1"
}
