From borderless data to borderless context: context engineering for cross-cloud agents Google Cloud published a walkthrough showing how to import Snowflake semantic views and Databricks metric views into Knowledge Catalog and link them to federated Iceberg tables via a context set, so that Gemini Enterprise agents resolve business metrics consistently before querying data through BigQuery. The example uses a fictional online store, Cymbal Shop, whose finance team defines revenue as net sales counting completed orders only in a Snowflake semantic view, while its marketing team defines loyalty tiers in a Databricks metric view. The Knowledge Catalog integration in Gemini Enterprise is in Preview, and the sample data and setup scripts are in the lakehouse-solutions repository on GitHub. In our previous post, Cross-cloud conversational analytics made simple with open standards https://cloud.google.com/blog/products/data-analytics/cross-cloud-conversational-analytics-with-borderless-lakehouse , we showed how Google Cloud's borderless Lakehouse lets you query Snowflake, Databricks and AWS Glue data in place from BigQuery. Once the data is reachable, the next step is to make sure that AI agents answer questions the same way your business does. We see that in many organizations, each team or domain defines its key metrics in the tools it already uses. In our example, the finance team defines revenue in a Snowflake semantic view, and the marketing team defines loyalty tiers in a Databricks metric view. An agent that can query the tables but can't see these definitions has to decide on its own what "revenue" means, and it can pick the wrong definition. In this post, we import both semantic models into Knowledge Catalog, add a context set that links them to their Lakehouse tables and says how the two systems connect, and then ask Gemini Enterprise the same question without and with that context. As figure 1 shows, the agent looks up the business context through the Knowledge Catalog integration https://docs.cloud.google.com/gemini/enterprise/docs/connectors/connect-knowledge-catalog Preview in Gemini Enterprise and then queries the data through BigQuery. Before you begin: This post uses federated Iceberg tables, set up the same way as in our cross-cloud post https://cloud.google.com/blog/products/data-analytics/cross-cloud-conversational-analytics-with-borderless-lakehouse . We ran all the steps as a project owner. For the required APIs and roles, see the Snowflake https://docs.cloud.google.com/knowledge-catalog/docs/snowflake-horizon-transfer before-you-begin and Databricks https://docs.cloud.google.com/knowledge-catalog/docs/databricks-unity-transfer before-you-begin connector guides, Manage context sets https://docs.cloud.google.com/knowledge-catalog/docs/manage-context-sets and, for Gemini Enterprise, Connect to BigQuery https://docs.cloud.google.com/gemini/enterprise/docs/connectors/connect-bigquery bq-prereqs . Our example company, Cymbal Shop, is a fictional online store. It keeps orders and customers in Snowflake, and loyalty members and app visits in Databricks. The sample data and setup scripts are in the lakehouse-solutions repository on GitHub https://github.com/GoogleCloudPlatform/lakehouse-solutions/tree/main/solutions/cross-cloud-semantic-context . Finance defines revenue in a Snowflake semantic view. Revenue, also called net sales, counts completed orders only: Marketing defines loyalty tiers in a Databricks metric view. Customers who aren't loyalty members have no tier: The full definitions are in the GitHub repository https://github.com/GoogleCloudPlatform/lakehouse-solutions/tree/main/solutions/cross-cloud-semantic-context . Knowledge Catalog's built-in connectors import Snowflake semantic views and Databricks metric views. Each connector runs as a BigQuery Data Transfer Service job and writes the metadata to a Knowledge Catalog entry group: In Snowflake and Databricks, create a read-only identity for the connector. The grants are in the GitHub repository https://github.com/GoogleCloudPlatform/lakehouse-solutions/tree/main/solutions/cross-cloud-semantic-context . In the Google Cloud console, go to Knowledge Catalog . In the Manage section, click Connectors , click Add connection , and select Snowflake Horizon . Enter the connection details, browse to the database, and create a new entry group. We named ours snowflake horizon . Choose a schedule, or run the job on demand. Repeat the steps with the Databricks Unity Catalog card and an entry group named databricks unity . Each run imports the semantic models with their formulas, descriptions, synonyms and relationships, and links them to their source tables. The imported models still use their source table names, such as SF RETAIL DB.SHOP.ORDERS, while the agent queries the same table in BigQuery as my-lakehouse-project.sf retail db.SHOP.ORDERS. Neither model says that customer id links Snowflake customers to Databricks loyalty members. In the next step, we add both of these to a context set. A context set https://docs.cloud.google.com/knowledge-catalog/docs/context-sets Preview is a Knowledge Catalog entry group that holds the context an agent should use for a domain. You can create one in Knowledge Studio Preview under Context sets , where enrichment tasks propose entries for a data steward to approve. We wanted our context set to link to the imported models rather than copy them, so we added the entries through the Knowledge Catalog API. Our context set has a root document and two folders: Semantic models: one document for each model, linked to the imported model and to its Lakehouse tables. Business rules: one document that says how customers relate across the two systems, linked to the ORDERS , CUSTOMERS and loyalty members tables. Agents find this context through Knowledge Catalog search, which builds on Google Search technology: it combines semantic and keyword matching, and re-ranks results with machine learning. When the agent looks up a model document, Knowledge Catalog returns the model's metrics, including their formulas and synonyms, and the linked Lakehouse tables with their BigQuery names and schemas. A script in the GitHub repository https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/cross-cloud-semantic-context/provisioning-automation/knowledge-catalog/build context set.sh creates the context set, all of its documents and all nine links. We connected Gemini Enterprise to BigQuery in federated query mode Preview , which turns on the Knowledge Catalog integration automatically. We also added one sentence to the assistant instructions. In your Gemini Enterprise app, click Configurations , select the Assistant tab, select Customize under Additional LLM system instructions , enter the following sentence, and click Save and publish see Configure the assistant https://docs.cloud.google.com/gemini/enterprise/docs/configure-assistant : Before writing SQL, look up the source semantic model's own catalog entry Snowflake or Databricks , not just the summary attached to the context set, and use its relationships and metric definitions. Then we asked the same question twice: "What was our revenue by loyalty tier?" Without context. First, we turned off Enable Knowledge Catalog on the same Assistant tab. The agent could still query the tables, but it couldn't see any business definitions. It found the orders and loyalty tables and joined them, but it had to guess what revenue meant. It reported two figures: revenue from completed orders, and a "net revenue" that subtracted returned orders a second time. With context. Then we turned the integration back on. The agent reported one revenue figure per tier. It also said where the definitions came from: the NET SALES metric in the Snowflake semantic view, the loyalty tier in the Databricks metric view, and customer id as the key between the two systems. Recreate the definitions as BigQuery measures for deterministic SQL : As an extra step, you can recreate the Snowflake and Databricks definitions as BigQuery measures https://docs.cloud.google.com/bigquery/docs/graph-measures on a property graph. The graph can be built on native BigQuery tables and on "Lakehouse Iceberg REST catalog tables" Schema overview https://docs.cloud.google.com/bigquery/docs/graph-schema-overview , such as the federated tables in this post. Queries then reuse the stored measure instead of rewriting its formula, and BigQuery adds graphs to the Knowledge Catalog automatically. Put other cross-system rules in context set documents: For example, describe your fiscal calendar, or which system is the source of truth for each metric. Control what the agent can see: Gemini Enterprise searches Knowledge Catalog with each user's own credentials. Grant access to the context set and its tables only to the groups that should use them. In this post, we imported a Snowflake semantic view and a Databricks metric view into Knowledge Catalog, linked them to their Lakehouse tables in a context set, and added one document that connects the two systems. Without that context, the agent invented its own definition of revenue. With it, the agent used Finance's definition and Marketing's loyalty tiers, and returned the number the business reports. To try it, follow the step-by-step lab https://github.com/GoogleCloudPlatform/lakehouse-solutions/blob/main/solutions/cross-cloud-semantic-context/lab-manuals/manual.md in the lakehouse-solutions repository, and see Manage context sets https://docs.cloud.google.com/knowledge-catalog/docs/manage-context-sets . If you're new to cross-cloud federation, start with our borderless Lakehouse post https://cloud.google.com/blog/products/data-analytics/cross-cloud-conversational-analytics-with-borderless-lakehouse . To discuss this approach for your own data, contact your Google Cloud account team or customer engineer.