> For the complete documentation index, see [llms.txt](https://docs.datapancake.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datapancake.com/core-concepts/views/schema-analysis-views.md).

# Schema Analysis Views

Views for analyzing attributes, polymorphic versions, and schema evolution.

**Note:** Primary attribute views (`vw_datasource_active_attributes`, `vw_datasource_all_attributes`, `vw_datasource_version_all_attributes`) are documented in [Attributes: Integration & API](/core-concepts/attribute-metadata/integration-and-api.md). This page covers additional attribute-related views.

## VW\_DATASOURCE\_ATTRIBUTES

Complete attribute metadata including all polymorphic versions and configuration.

**Contents:** Attribute identification, polymorphic version information, source schema metadata, destination schema configuration, transformation configuration, semantic layer configuration, security policy settings, code generation flags, Gen AI semantic model configuration

**Use cases:** Complete attribute metadata access, configuration review, integration workflows, code generation input

Example Query:

```sql
SELECT 
    attribute_path,
    polymorphic_attribute_name,
    source_data_type,
    data_platform_data_type,
    include_in_code_gen,
    transformation_expression
FROM core.vw_datasource_attributes
WHERE datasource_id = 'your-datasource-id'
  AND version_status = 'active'
ORDER BY attribute_path;
```

## VW\_DATASOURCE\_POLYMORPHIC\_ATTRIBUTES

Attributes that have multiple active polymorphic versions (polymorphic attributes).

**Contents:** Attributes with multiple active versions, polymorphic version count, attribute identification

**Use cases:** Identifying polymorphic attributes, polymorphism analysis, data quality assessment

Example Query:

```sql
SELECT 
    datasource_name,
    attribute_path,
    polymorphic_versions
FROM core.vw_datasource_polymorphic_attributes
WHERE datasource_id = 'your-datasource-id'
ORDER BY polymorphic_versions DESC;
```

## VW\_DATASOURCE\_ACTIVE\_ATTRIBUTE\_CATALOG

Simplified catalog of active attributes for data dictionary and documentation.

**Contents:** Attribute paths/names, attribute comments/context, data source comments/context, attribute synonyms

**Use cases:** Data dictionary generation, documentation, attribute cataloging

## VW\_DATASOURCE\_ACTIVE\_ATTRIBUTE\_VERSION\_CATALOG

Catalog of active polymorphic versions for data dictionary.

**Contents:** Polymorphic version names, data types, sample values, alias names, W question categories, comments, synonyms

**Use cases:** Data dictionary generation, version cataloging, documentation

**Note:** These catalog views are not explicitly defined in the codebase; may be referenced but not created.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datapancake.com/core-concepts/views/schema-analysis-views.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
