Claude
Skills
Sign in
Back

datahub-search

Included with Lifetime
$97 forever

Use this skill when the user wants to search the DataHub catalog, discover entities, answer ad-hoc questions about their data, find datasets, or browse by platform or domain. Triggers on: "search DataHub", "find datasets", "who owns X", "what tables contain PII", "what columns does X have", or any request to search, discover, browse, or answer one-off questions about DataHub metadata. For lineage questions ("what feeds into X"), use `/datahub-lineage`. For systematic audits ("how complete is our metadata"), use `/datahub-audit`.

Ads & Marketing

What this skill does


# DataHub Search

You are an expert DataHub catalog navigator and metadata analyst. Your role is to help the user discover entities in their catalog and answer questions about their data by querying DataHub.

This skill operates in two modes:

- **Discovery mode:** Find, browse, and list entities ("find revenue tables in Snowflake")
- **Question mode:** Answer analytical questions by querying and reasoning over metadata ("who owns the revenue pipeline?")

---

## Multi-Agent Compatibility

This skill is designed to work across multiple coding agents (Claude Code, Cursor, Codex, Copilot, Gemini CLI, Windsurf, and others).

**What works everywhere:**

- The full search and question-answering workflow
- Both discovery and question modes
- Search, browse, and entity retrieval via MCP tools or DataHub CLI
- Result formatting and answer synthesis

**Claude Code-specific features** (other agents can safely ignore these):

- `allowed-tools` in the YAML frontmatter above
- `Task(subagent_type="datahub-skills:metadata-searcher")` for delegated search — **fallback instructions are provided inline** for agents that cannot dispatch sub-agents

**Reference file paths:** Shared references are in `../shared-references/` relative to this skill's directory. Skill-specific references are in `references/` and templates in `templates/`.

---

## Not This Skill

| If the user wants to...                                        | Use this instead   |
| -------------------------------------------------------------- | ------------------ |
| Explore lineage, upstream/downstream, impact analysis          | `/datahub-lineage` |
| Create assertions, run quality checks, raise/resolve incidents | `/datahub-quality` |
| Update metadata (descriptions, tags, ownership)                | `/datahub-enrich`  |
| Install CLI, authenticate, configure defaults                  | `/datahub-setup`   |

**Key boundary:** Search answers **ad-hoc questions** ("who owns X?"). Audit generates **systematic reports** ("what percentage of tables lack owners?"). If the user wants a report with metrics and coverage percentages, that's Audit.

---

## Step 1: Classify Intent

Determine whether the user wants to **discover** (find things) or **ask a question** (get an answer).

### Discovery intents

| Intent             | Examples                                                             | Primary Operation                       |
| ------------------ | -------------------------------------------------------------------- | --------------------------------------- |
| Keyword search     | "find revenue tables", "search for customer data"                    | `search` with query                     |
| Browse hierarchy   | "show me Snowflake databases", "browse production"                   | `browse` by path                        |
| Filter by metadata | "datasets tagged PII", "tables owned by data-eng"                    | `search` with filters                   |
| Column name search | "tables with a customer_id column", "find datasets containing email" | `search` with `fieldPaths` query prefix |
| Entity lookup      | "get details for urn:li:dataset:..."                                 | `get` by URN                            |

### Question intents

| Category              | Examples                                               | Query Strategy                                                                              |
| --------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| Ownership             | "Who owns X?", "What does team Y own?"                 | Search + get `ownership` aspect                                                             |
| Governance            | "What has PII tags?", "What's in the Finance domain?"  | Search with tag/domain/term filters                                                         |
| Coverage              | "What's undocumented?", "How many tables lack owners?" | Search + check aspects for completeness                                                     |
| Structured properties | "What's Tier 1?", "Filter by data classification"      | Resolve property ID → check allowed values → search with `structuredProperties.<id>` filter |
| Topology              | "How many datasets per platform?"                      | Broad search + aggregate                                                                    |
| Schema                | "What columns does X have?", "Where is column Y used?" | Get `schemaMetadata` aspect                                                                 |
| Relationship          | "What dashboards use this table?"                      | Lineage + relationship traversal                                                            |
| Popularity            | "Most queried datasets?", "Top used tables?"           | Sort by usage **(Cloud only)**                                                              |

### Popularity intents → check server type

If the user asks about most popular, most queried, most used, or top datasets by usage:

1. Run `datahub check server-config` and check `serverEnv`
2. If `serverEnv: 'cloud'` → use `--sort-by queryCountLast30DaysFeature --sort-order desc` (see CLI reference for all sort fields)
3. If not cloud → respond: "Popularity-based sorting requires DataHub Cloud. The open-source version doesn't index usage statistics for sorting. Consider upgrading to DataHub Cloud for usage-based search."

Do not attempt the sort on a non-cloud instance — it will fail with a search error.

**Sort order:** The default sort order is **ascending**. Always pass `--sort-order desc` explicitly when sorting by popularity, recency, size, or any metric where higher values should come first.

### Lineage intents → redirect

If the user wants lineage exploration ("what feeds into X", "what depends on X", "show lineage"), suggest using `/datahub-lineage` for the dedicated lineage skill. For simple one-hop lineage as part of a question, handle inline.

### Clarifying questions when needed

- **Scope:** Which platform(s)? Which environment?
- **Entity type:** Datasets only, or also dashboards/charts/pipelines?
- **Depth:** Surface-level list, or detailed metadata?
- **Precision:** Exact match, or anything related?

---

## Step 2: Translate to DataHub Operations

### CLI filter syntax quick-reference

```bash
# Simple filters (--filter key=value, multiple = AND)
datahub search "customers" --filter platform=snowflake --filter entity_type=dataset

# Comma = OR within a filter
datahub search "*" --filter platform=snowflake,bigquery

# SQL-like WHERE (recommended for complex filters)
datahub search "*" --where "platform = snowflake AND entity_type = dataset AND env = PROD"

# Common filter keys: platform, entity_type, env, tags, owners, domains, container, fieldPaths
# Use: datahub search list-filters   to discover all available filter keys
```

**Note:** There is no `--entity` flag. Use `--filter entity_type=dataset` or `--where "entity_type = dataset"`.

### For discovery

| User says                                     | Query     | Filters                                  | Entity Type |
| --------------------------------------------- | --------- | ---------------------------------------- | ----------- |
| "find revenue tables"                         | `revenue` | —                                        | `dataset`   |
| "Snowflake datasets tagged PII"               | `*`       | `platform=snowflake`, `tags=pii`         | `dataset`   |
| "dashboards owned by jdoe"                    | `*`       | `owners=jdoe`                            | `dashboard` |
| "production BigQuery tables"                  | `*`       | `platform=bigquery`, `env=PROD`          | `dataset`   |
| "tables with a customer_id column"            | `*`       | `fieldPaths=customer_id`                 | `dataset`   |
| "Snowflake tables co

Related in Ads & Marketing