> 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/attribute-metadata.md).

# Attribute Metadata

## Overview

Attributes are discovered during scanning and serve as the metadata foundation for generating Dynamic Tables and Views. DataPancake discovers every attribute path at any nesting depth, including:

* All nested structures (any depth)
* Embedded/stringified JSON (recursively parsed)
* Polymorphic variations (same path, different data types)

**Key DataPancake Behavior:** When an attribute is first discovered, DataPancake **proactively creates all 7 polymorphic versions** immediately. Only versions matching discovered data types are activated (`VERSION_STATUS = 'active'`). Inactive versions remain ready for future activation, enabling seamless schema evolution.

***

## Documentation

* [**Attribute Discovery**](/core-concepts/attribute-metadata/attribute-discovery-process.md) - Discovery process and embedded JSON handling
* [**Attribute Types**](/core-concepts/attribute-metadata/attribute-metadata-types.md) - Discovered, Schema, and Virtual attributes
* [**Polymorphic Versions**](/core-concepts/attribute-metadata/polymorphic-versions.md) - The 7 polymorphic variations and proactive creation
* [**Attribute Metadata Fields**](/core-concepts/attribute-metadata/datapancake-metadata-fields.md) - Complete field reference
* [**Arrays & Nested Structures**](/core-concepts/attribute-metadata/arrays-and-nested-structures.md) - Array handling and relationships
* [**Attribute Lifecycle**](/core-concepts/attribute-metadata/attribute-lifecycle.md) - Creation, versioning, and schema evolution
* [**Attributes in Code Generation**](/core-concepts/attribute-metadata/attributes-in-code-generation.md) - How attributes become SQL columns
* [**Integration & API**](/core-concepts/attribute-metadata/integration-and-api.md) - Stored procedures and views

***

## Quick Reference

**Attribute Types:**

* `'Discovered'` - Found during scanning (`ATTRIBUTE_CREATE_TYPE = 'Discover'`)
* `'Schema'` - Created from schema samples (`ATTRIBUTE_CREATE_TYPE = 'Schema'`)
* `'Virtual'` - User-created via UI/API

**The 7 Polymorphic Versions** (created proactively for every attribute):

1. `str` → `{name}_str`
2. `int` → `{name}_int`
3. `float` → `{name}_float`
4. `bool` → `{name}_bool`
5. `object` → `{name}_object`
6. `array_primitive` → `{name}_array_primitive`
7. `array_object` → `{name}_array_object`

**Key Tables:**

* `core.datasource_attribute` - Core attribute metadata
* `core.datasource_attribute_polymorphic_version` - Version-specific metadata


---

# 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/attribute-metadata.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.
