live wire
▸EKOS submits 70.15% on BIRD’s hidden test and 88.33% on Mini-Dev with different Claude models; both entries are pendingBIRD submission PR #270▸MotherDuck rolls out DuckDB 2.0 with async I/O and reports faster cold reads in TPC-H and TPC-DS testsMotherDuck▸ThoughtSpot Spotter starts rolling out answer explanations for token-based results, not AgentQLThoughtSpot▸Snowflake previews Z.ai GLM 5.4 in Cortex Inference, but not in Cortex AgentsSnowflake release notes▸Removing Vietnamese diacritics cut text-to-SQL accuracy by 10.3–37.0 points across four models in an author studyLe Trung et al., Vietnamese MultiSpider artifacts▸Avelis 1.7 adds AI-built dashboards and reruns pinned exploratory SQL under each viewer’s permissionsAvelis release notes▸Aurora MySQL previews cluster groups with one routing endpoint; each query still runs on one clusterAWS What's New▸Rewind-HNSW uses 86.9% less memory than full snapshots in authors’ 20-version testsShea et al., Rewind-HNSW §5.5▸Snowflake previews pausing downstream dynamic table refreshes when data quality checks failSnowflake release notes▸BigQuery previews optional GoogleSQL optimization suggestions in its interactive SQL translatorGoogle Cloud documentation▸Snowflake extends its Tableau and Power BI dashboard migration preview to Azure deploymentsSnowflake release notes▸Google Cloud makes it generally available to unpublish Iceberg data shares from SAP Business Data CloudGoogle Cloud — BigQuery and Lakehouse documentation▸AWS previews organization-wide cost questions in Ops Agent for FinOpsAWS What's New▸Looker updates require API login credentials in the request body, not the URLGoogle Cloud — Looker documentation▸EKOS submits 70.15% on BIRD’s hidden test and 88.33% on Mini-Dev with different Claude models; both entries are pendingBIRD submission PR #270▸MotherDuck rolls out DuckDB 2.0 with async I/O and reports faster cold reads in TPC-H and TPC-DS testsMotherDuck▸ThoughtSpot Spotter starts rolling out answer explanations for token-based results, not AgentQLThoughtSpot▸Snowflake previews Z.ai GLM 5.4 in Cortex Inference, but not in Cortex AgentsSnowflake release notes▸Removing Vietnamese diacritics cut text-to-SQL accuracy by 10.3–37.0 points across four models in an author studyLe Trung et al., Vietnamese MultiSpider artifacts▸Avelis 1.7 adds AI-built dashboards and reruns pinned exploratory SQL under each viewer’s permissionsAvelis release notes▸Aurora MySQL previews cluster groups with one routing endpoint; each query still runs on one clusterAWS What's New▸Rewind-HNSW uses 86.9% less memory than full snapshots in authors’ 20-version testsShea et al., Rewind-HNSW §5.5▸Snowflake previews pausing downstream dynamic table refreshes when data quality checks failSnowflake release notes▸BigQuery previews optional GoogleSQL optimization suggestions in its interactive SQL translatorGoogle Cloud documentation▸Snowflake extends its Tableau and Power BI dashboard migration preview to Azure deploymentsSnowflake release notes▸Google Cloud makes it generally available to unpublish Iceberg data shares from SAP Business Data CloudGoogle Cloud — BigQuery and Lakehouse documentation▸AWS previews organization-wide cost questions in Ops Agent for FinOpsAWS What's New▸Looker updates require API login credentials in the request body, not the URLGoogle Cloud — Looker documentation
nl2sql.ai
guideSQL CORRECTNESS

Snowflake ARRAY_POSITION can make a first-touch channel disappear from a funnel

A position of zero means the channel appeared first, not that it was missing. Test for NULL when the question is whether it appeared at all.

By The News Desk· Nov 29, 2026the quick take — two AI hosts go live when you do

When an analyst asks how many customer journeys included email, a SQL assistant might look up the channel in each journey’s ordered array and count positions greater than zero. In Snowflake, that answers a different question: how many journeys first encountered email after the first touch. Snowflake’s ARRAY_POSITION reference says the index starts at zero and an absent value returns SQL NULL.

One fixture, three different counts

Take three illustrative sequences: ['email', 'search'], ['search', 'email'], and ['search', 'social']. Searching for 'email'::VARIANT in those semi-structured arrays gives positions 0, 1, and NULL, respectively, under the documented rules. A filter of position > 0 counts one journey. A filter of position IS NOT NULL counts two. A filter of position = 0 counts one, but it counts the other journey: the one where email was the first touch. This is a worked example, not a production measurement.

The danger is that the wrong answer still looks plausible. A dashboard can show a nonzero count even after silently dropping every journey that started with email. The example also catches a tempting rewrite: COALESCE(position, 0) gives both the first-touch journey and the no-email journey the same value. Once that distinction is lost, a later filter on the coalesced position alone cannot recover it.

Test the question, not just the query

For an analytics agent, make those three rows a regression test and ask three separate questions: “Did it appear anywhere?”, “Was it the first touch?”, and “Did it first appear after another touch?” Check which rows qualify, not just the counts: the last two answers are both one in this fixture. If a report needs a human-readable ordinal, preserve NULL for no match and add one to the returned index for display. And if the question is how often email appeared, this is the wrong function to answer it on its own: the reference specifies that ARRAY_POSITION returns only the first occurrence.

Filed by The News Desk. Corrections: desk@nl2sql.ai · Our standards →

comments · 0

    Comments are moderated before they appear. Your email is used once to confirm it is you — never shown, never sold. Corrections and questions get an answer from the desk when we have one.