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 SPLIT_PART can group a missing campaign label with a blank one

A suffix that was never sent and one that was sent empty both become an empty string. Keep the delimiter check if they mean different things in your reporting.

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

Suppose a marketing export encodes a channel and an optional campaign label as channel|label. In this example, paid means the producer omitted the second field, while paid| means it sent the field but left it blank. In Snowflake, SPLIT_PART(raw_key, '|', 2) returns the same empty string for both. If an analytics agent groups by that expression alone, it cannot tell how many labels were omitted and how many were sent blank.

One result, two reasons

Snowflake’s SPLIT_PART reference says that requesting an out-of-range part returns an empty string. It also says that whitespace is not required to make an empty field: the space after a trailing delimiter is itself a valid, empty part. A SQL NULL input is different again; the function returns NULL rather than an empty string.

Example inputExpected second partMeaning in this export
paidEmpty stringField missing
`paid\`Empty stringField present but blank
`paid\spring`springField present with a value
SQL NULLSQL NULLEntire key missing

These are expected results for a synthetic fixture, derived from the documented rules. The distinction is visible before extraction: Snowflake’s SPLIT reference specifies that a trailing separator produces an empty element in the returned array. Splitting paid gives one element; splitting paid| gives two.

Classify the input before grouping

For an export that allows at most one pipe and does not allow escaped delimiters, test for the separator before testing the extracted label:

CASE
  WHEN raw_key IS NULL THEN 'key_missing'
  WHEN raw_key NOT LIKE '%|%' THEN 'label_missing'
  WHEN SPLIT_PART(raw_key, '|', 2) = '' THEN 'label_blank'
  ELSE 'label_present'
END AS label_status

Count by label_status when investigating feed quality, and keep the extracted campaign label as a separate column for performance reporting. If the format permits quoted delimiters or extra fields, validate against that format rather than using the one-pipe check. For agent-generated SQL, put all four rows in an acceptance test and assert four distinct statuses if that is the business rule. If the reporting definition deliberately merges omitted and blank labels, document that decision instead of letting the parser make it silently.

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.