# 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datapancake.com/core-concepts/attribute-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
