---
title: Find data products and write SQL with Claude
description: Ask Claude a business question, and it finds the matching data products in the Data Marketplace and writes SQL for their output ports.
---

[Skip to content](https://knowledge.bigenius-x.com/find-data-products-and-write-sql-with-claude#main-content)

[Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en) [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal?hsLang=en)

[![TRI\_Logo\_biGENIUS\_2020\_RGB\_s](https://knowledge.bigenius-x.com/hs-fs/hubfs/Marketing/TRI_Logo_biGENIUS_2020_RGB_s.png?width=150&height=42&name=TRI_Logo_biGENIUS_2020_RGB_s.png)](https://www.bigenius-x.com/)

Open main navigation

Close main navigation

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new)
- [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [biGENIUS-X Knowledge Base](https://knowledge.bigenius-x.com/?hsLang=en)
2. [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en)
3. [MCP server](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#mcp-server)

# Find data products and write SQL with Claude

**Applies to**  
License: Enterprise · Data Marketplace · MCP Server

Ask Claude a business question, and it finds the matching data products in the Data Marketplace and writes SQL for their output ports. Use it when you need a query or a report over data products. Afterwards you have SQL, checked against the data contracts, that your own tool or agent runs on your database.

The MCP server never runs the query: it knows neither your database server nor your schema.

### Prerequisites

- Claude Code with the plugin `bigenius-data-marketplace`, signed in to `bigenius-marketplace`. See [Set up Claude Code for biGENIUS-X](https://knowledge.bigenius-x.com/set-up-claude-code-for-bigenius-x?hsLang=en). In the Claude desktop chat or on claude.ai, add the server as a connector instead; see [Connect other AI clients to the MCP server](https://knowledge.bigenius-x.com/connect-other-ai-clients-to-the-mcp-server?hsLang=en). You need no project repository.
- A biGENIUS-X account with access to the Data Marketplace. Claude sees all data products of your organization. See [Understand the data product overview](https://knowledge.bigenius-x.com/understand-the-data-product-overview?hsLang=en).
- Output ports with an active data contract. Claude can write SQL only for those.

### Find a data product and get SQL

1. Ask your question in business terms, for example how many customers live in each city. Claude calls `search_data_products` and selects the data products that match.
2. Read the answer. Claude names the output port that fits, what it contains and what is missing for your question; it reads them with `get_data_product`.
3. Ask for the SQL. Claude calls `get_query_context` and writes the SQL in the dialect of the output port's platform, with only the tables and columns of the newest active data contract.
4. Read the notes that come with the SQL. Claude checks it with `check_query` and points out unknown tables or columns, columns with a data classification, and historized objects without a validity filter.
5. Pass the hand-over block to the tool or agent that runs the query. The block holds the SQL, the platform, the data products and output ports with their data contract versions, the tables, and the classified columns.
6. Have the placeholder `{{schema}}` replaced with the schema where the output port is deployed in your environment, then run the query. Ask the owner of the data product when you do not know the schema.

### How Claude writes the SQL

- Tables are written as `{{schema}}.<table>`, because biGENIUS-X does not know where the data product is deployed.
- For a historized object, the current version is the row whose validity range contains the current time.
- A fact joins a historized dimension over its surrogate key without a current-version filter, so the fact gets the version that was valid at its time.
- Output ports on different platforms cannot be joined in one query. Claude writes a separate query per platform.
- Data contracts do not name the targets of foreign keys. The server derives them from the column names, and Claude tells you when a join depends on such a derived key. Check those joins with the owner of the data product.

### Example

Example: a data product `Customer Accounts` on Microsoft SQL Server, with the historized dimension `DimCustomer` and the validity columns `BG_ValidFromTimestamp` and `BG_ValidToTimestamp`. In a real data contract, table and column names come from its project.

```
How many customers live in each city today?
Write the SQL for the Customer Accounts data product.
```

Claude returns SQL of this shape, together with a hand-over block:

```
SELECT c.City, COUNT(*) AS CustomerCount
FROM {{schema}}.DimCustomer AS c
WHERE c.BG_ValidFromTimestamp <= CURRENT_TIMESTAMP
  AND c.BG_ValidToTimestamp > CURRENT_TIMESTAMP
GROUP BY c.City
```

The filter keeps the current version of each customer, so every customer is counted once, in the city where they live today. Without it, a customer who moved would be counted once per historized version.

### Check the result

The SQL runs in your tool after you replace `{{schema}}`, and the notes of `check_query` name no unknown table or column.

### Failure symptoms and recovery

#### Claude finds no matching data product

Cause: no data product of your organization matches the question, or a new data product is not visible yet. The server keeps the list of data products for up to 5 minutes and data contracts for up to 30 minutes.  
Fix: rephrase the question with the business terms of the data products, or ask again after that time.

#### An output port cannot be queried

Message: `Output port <output port> of <data product> has no active data contract and cannot be queried yet.`  
Cause: the output port has no data contract with status Active.  
Fix: ask the owner of the data product to activate a data contract.

Sign-in and license errors are in [MCP server troubleshooting](https://knowledge.bigenius-x.com/mcp-server-troubleshooting?hsLang=en).

### Related articles

- Previous: [Set up Claude Code for biGENIUS-X](https://knowledge.bigenius-x.com/set-up-claude-code-for-bigenius-x?hsLang=en)
- Reference: [Understand the output port overview](https://knowledge.bigenius-x.com/understand-the-output-port-overview?hsLang=en)
- See also: [biGENIUS-X MCP server](https://knowledge.bigenius-x.com/bigenius-x-mcp-server?hsLang=en), [Understand the data product overview](https://knowledge.bigenius-x.com/understand-the-data-product-overview?hsLang=en), [MCP server troubleshooting](https://knowledge.bigenius-x.com/mcp-server-troubleshooting?hsLang=en)

- [Getting started](https://knowledge.bigenius-x.com/getting-started?hsLang=en#main-content)

    - [Guidelines](https://knowledge.bigenius-x.com/getting-started?hsLang=en#guidelines)
    - [Start working](https://knowledge.bigenius-x.com/getting-started?hsLang=en#start-working)
    - [Account](https://knowledge.bigenius-x.com/getting-started?hsLang=en#account)
- [General overview](https://knowledge.bigenius-x.com/general-overview?hsLang=en)
- [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#main-content)

    - [MCP server](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#mcp-server)
- [Application Modules](https://knowledge.bigenius-x.com/application-modules?hsLang=en#main-content)

    - [Administration](https://knowledge.bigenius-x.com/application-modules?hsLang=en#administration)
    - [Solutions](https://knowledge.bigenius-x.com/application-modules?hsLang=en#solutions)
    - [Global Features](https://knowledge.bigenius-x.com/application-modules?hsLang=en#global-features)
    - [Projects](https://knowledge.bigenius-x.com/application-modules?hsLang=en#projects)
    - [Branches](https://knowledge.bigenius-x.com/application-modules?hsLang=en#branches)
    - [Data Connections](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-connections)
    - [Dataflow Modeling - Overview](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-overview)
    - [Dataflow Modeling - Wizard Steps](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-wizard-steps)
    - [Dataflow Modeling - Terms](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-terms)
    - [Dataflow Modeling - Term Mapping](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-term-mapping)
    - [Dataflow Modeling - Relationships](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-relationships)
    - [Dataflow Modeling - Data Quality](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-data-quality)
    - [Dataflow Modeling - Indexes](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-indexes)
    - [Relationship Modeling](https://knowledge.bigenius-x.com/application-modules?hsLang=en#relationship-modeling)
    - [Generate Artifacts](https://knowledge.bigenius-x.com/application-modules?hsLang=en#generate-artifacts)
    - [Project Settings](https://knowledge.bigenius-x.com/application-modules?hsLang=en#project-settings)
    - [Data Marketplace](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-marketplace)
- [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en#main-content)

    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Databricks dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks-dbt)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Oracle](https://knowledge.bigenius-x.com/generators?hsLang=en#oracle)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Snowflake dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake-dbt)
    - [Artifacts](https://knowledge.bigenius-x.com/generators?hsLang=en#artifacts)
    - [Replace Placeholders](https://knowledge.bigenius-x.com/generators?hsLang=en#replace-placeholders)
    - [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)
    - [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)
    - [Deployment with an Azure DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azure-devops-pipeline)
    - [Delta Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#delta-deployment)
    - [Load control environment](https://knowledge.bigenius-x.com/generators?hsLang=en#load-control-environment)
    - [Load data with a native load control](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-a-native-load-control)
    - [Load data with Apache Airflow](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-apache-airflow)
    - [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)
    - [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)
    - [Default Terms](https://knowledge.bigenius-x.com/generators?hsLang=en#default-terms)
- [Discovery application](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#main-content)

    - [Discovery configurations](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#discovery-configurations)
- [Best practices](https://knowledge.bigenius-x.com/best-practices?hsLang=en#main-content)

    - [Modeling Approaches](https://knowledge.bigenius-x.com/best-practices?hsLang=en#modeling-approaches)
    - [Use Cases](https://knowledge.bigenius-x.com/best-practices?hsLang=en#use-cases)
    - [Business Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#business-rules)
    - [Data Quality Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#data-quality-rules)
- [FAQs](https://knowledge.bigenius-x.com/faqs?hsLang=en)
- [Product Release Notes](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#main-content)

    - [SaaS Application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#saas-application)
    - [Discovery application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#discovery-application)
    - [Generators](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#generators)
- [Legal Documents](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#main-content)

    - [Current legal docs](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#current-legal-docs)
    - [Software Product and Limits](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#software-product-and-limits)

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en)
- [Customer Portal](https://knowledge.bigenius-x.com/customer-portal)
- [Sign in](https://knowledge.bigenius-x.com/_hcms/mem/login)

[![biGENIUS logo](https://knowledge.bigenius-x.com/hubfs/TRI_Logo_biGENIUS_2020_RGB-1.svg "biGENIUS logo")](https://www.bigenius-x.com)

<https://www.linkedin.com/company/bigenius> <https://www.youtube.com/@biGENIUS_DWA>

All rights reserved © 2025, biGENIUS AG