

# What a data mapping is: ontologies paired with one filtered source, producing one sub-graph

A data mapping binds three things together:
+  *One connection* – the connection that points at a single data source. You create the connection first. See [Connecting data sources](connecting-data-sources.md).
+  *The subset of the source to build from* – A scope on the connection selects part of the source, such as specific databases in a catalog. Without a scope, AWS Context builds from the whole source. Data filters on the mapping narrow the subset further. See [Filters and scoping a connection](filters-and-scoping.md).
+  *One or more ontologies* – the models that AWS Context maps the selected data onto. A mapping can apply up to 10 ontologies.

 AWS Context uses this pairing to produce one sub-graph in the Agent Context. The filters and the ontology choice live on the mapping, not on the connection, which is why you can map the same connection more than once: to build different subsets, to apply different ontologies, or both.

Which ontologies a mapping can apply depends on the connection’s data source type:
+ A AWS Glue Data Catalog connection maps to the Data ontology. It cannot map to the Enterprise or Business Process ontology.
+ An Amazon Bedrock knowledge base connection maps to the Enterprise ontology, the Business Process ontology, or a custom ontology that you have published. It cannot map to the Data ontology.
+ A custom ontology can be mapped only on a knowledge base connection.

An ontology must be published before you can map it. For the built-in ontologies, see [Built-in ontologies](ontology-built-in.md). For publishing a custom ontology, see [Publish a draft ontology](ontology-draft-publish.md).

An Agent Context holds up to 20 connection mappings, and every connection you map must be active.