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 AGENT FIELD GUIDE

Snowflake OBJECT_AGG won’t choose between two values for the same metric

DISTINCT removes identical key-value pairs, not competing values. Inspect the rows at the report’s intended grain before building the object.

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

A SQL agent asked to return one object of metrics per region might generate OBJECT_AGG(metric_name, metric_value::VARIANT). That expression builds the object; it does not decide which value belongs under each key. If two rows in the Northeast group both use net_revenue but one says 120 and the other says 135, Snowflake documents a duplicate-field-key error. Adding DISTINCT does not fix that case: it removes pairs only when both the key and the value match. Snowflake’s OBJECT_AGG reference also says input pairs with a SQL NULL key or value are ignored.

Check the rows that feed the object

Consider a hypothetical report in which 120 is the preliminary number and 135 is the certified revision. If the prompt asks for certified metrics, filter to the certified revision before building the object. If it asks to compare both versions, the output needs to preserve the version, for example by returning one object per region and version. Using MAX(metric_value) would pick 135 in this example, but only by coincidence: certification is not a rule about which number is bigger.

For a first-pass diagnostic, run the following against the same input rows the object will see, after joins and report filters. It intentionally flags identical repeats as well as conflicting values, so it also catches duplication that DISTINCT could mask. The NULL filters align the check with the inputs Snowflake says OBJECT_AGG will consider; check missing values separately if they matter to the reader.

SELECT region, metric_name, COUNT(*) AS input_rows
FROM report_rows
WHERE metric_name IS NOT NULL
  AND metric_value IS NOT NULL
GROUP BY region, metric_name
HAVING COUNT(*) > 1;

When a key comes back, inspect the contributing rows before changing the aggregate. A join that copied a row, two revisions of one metric, and two different definitions exposed under the same label can all trigger the same error but call for different fixes. The useful instruction to give the agent is not “make the object query pass.” It is “show which rows compete for each key, and use the report’s rule to resolve them before aggregation.” The example is illustrative; the duplicate and NULL behavior comes from Snowflake’s documented contract.

sources

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.