Dev Tools

Snowflake web data enrichment

A Snowflake-native data app that uses `NIMBLE_AGENT_RUN` to run one `google_maps_search` Web Search Agent per warehouse row. Start with a table of search queries like "coffee shops in Williamsburg Brooklyn" or "gyms in Austin Texas," then generate a structured business universe with names, categories, addresses, ratings, review counts, phone numbers, websites, coordinates, and Google Maps URLs — all from SQL.

Quick Start

Inputs

  1. Search queries A list of location-based search strings inserted into the query staging table (e.g., “coffee shops in Williamsburg Brooklyn”, “gyms in Austin Texas”).

Outputs

  • One Snowflake table with structured business results per search query
  • Source query lineage per row
  • Business identity: name, category, and address
  • Reputation signals: rating, review count, and price level
  • Contact and location: phone, website, coordinates, and Maps URL
  • Operational fields: status, sponsored flag, and enrichment timestamp
  • Full raw entity stored as raw_entity for future extraction

How it works

A 3-phase pipeline. Read the blog here for a deeper explanation.

  1. Set up Snowflake Run the setup script once asit creates the role, warehouse, database, secret, network rule, and external access integration Snowflake needs to call Nimble's API endpoint.
  2. Install NIMBLE_AGENT_RUN Run the UDTF script to install the Python table function. it takes an agent name and input payload, calls Nimble synchronously, and returns a Snowflake VARIANT.
  3. Load search queries Insert your location search strings into the query staging table (e.g., "coffee shops in Williamsburg Brooklyn").
  4. Run the enrichment A single SELECT calls NIMBLE_AGENT_RUN with google_maps_search once per row — Snowflake handles parallelism automatically.
  5. Flatten and write The VARIANT response is flattened into typed columns and written to LOCAL_BUSINESSES — no Python pipeline, no external orchestrator.

Stack

Nimble primitives plus the full runtime stack.
Nimble APIs
What it does
  1. NIMBLE_AGENT_RUN Snowflake UDTF that runs one Nimble Web Search Agent per warehouse row and returns structured fields as Snowflake VARIANT data.
  2. google_maps_search Discovers local businesses from live Google Maps search queries. Returns business entities under parsing:entities:SearchResult.
3rd Party Tools
Role
  1. Snowflake Stores the input query table, executes the enrichment SQL, flattens Google Maps results, and writes the LOCAL_BUSINESSES output table.
  2. Snowflake UDTF Runs NIMBLE_AGENT_RUN as a table function inside the SQL query.
  3. External Access Integration Allows Snowflake to securely call Nimble’s API endpoint from inside the warehouse.
  4. Snowflake Secret Stores the Nimble API key used by the UDTF.
  5. Snowflake Warehouse Provides compute for the enrichment job.
Reach out if you have any questions.
Talk to an Expert