---
title: "Configure table mappings for a pipeline"
method: POST
path: "/v1/integration/continuous/projects/{projectId}/pipelines/{pipelineId}/mappings"
tags: ["Build and Configure Continuous Integration Projects"]
---

# Configure table mappings for a pipeline

`POST /v1/integration/continuous/projects/{projectId}/pipelines/{pipelineId}/mappings`

## Request

- Base URL: `https://integration-adapter.connect.cloud.precisely.com`
- URL: `https://integration-adapter.connect.cloud.precisely.com/v1/integration/continuous/projects/{projectId}/pipelines/{pipelineId}/mappings`
- Auth: HTTP bearer

Configures source-to-target table mappings for a specified pipeline within a continuous integration project.

**Process Overview:**
1. **Resource Validation** - Validates project and pipeline existence
2. **Mapping Configuration** - Applies source-to-target table mappings, supporting polymorphic source/target types (RDBMS, Kafka, Schema Registry)
3. **Customization** - Allows per-target customization (column mappings, metadata fields)
4. **Fallback Logic** - If columnMappings or includedCDCRowMetadata are not provided, defaults to exact mapping
5. **Validation & Persistence** - Validates and saves the mapping configuration

**Update Mode (`mode` query parameter):**
- `ADD` *(default)*: Merges request body mappings with existing pipeline mappings.
   Incoming mappings win on duplicate source/target signatures; unmentioned existing mappings are preserved.
- `REPLACE`: Discards all existing table mappings and stores only the mappings in the request body.

**Use Cases:**
- Define or update table mappings for a pipeline
- Incrementally add new source/target pairs without disrupting existing mappings (`ADD`)
- Update individual mapping configurations (e.g., column mappings) without affecting others (`ADD`)
- Fully reconfigure all table mappings for a pipeline (`REPLACE`)
- Support advanced mapping scenarios (custom columns, metadata)
- Integrate with multiple source/target types

**Required Permissions:** Either `replication-pipeline::create` or `replication-pipeline::update` when permission harmonization is enabled; otherwise, `replication-pipeline::manage`.

## Path parameters

- `projectId` string, required
- `pipelineId` string, required

## Query parameters

- `mode` 'ADD' | 'REPLACE'

## Request body

- ContinuousTableMappingRequest: Request model for automatic source-to-many-target table mapping for a continuous replication pipeline
  - `mappings` ContinuousMappingConfiguration[], required: List of mapping objects, each defining a 1-to-many source-to-target mapping
    - `source` ContinuousSourceMapping, required: Polymorphic source mapping configuration (e.g., RDBMS, KAFKA, SCHEMA_REGISTRY)
      - `type` 'RDBMS' | 'KAFKA' | 'SCHEMA_REGISTRY': The type of the source mapping (e.g., RDBMS, KAFKA, SCHEMA_REGISTRY)
    - `targets` ContinuousTargetMapping[]: List of target objects (polymorphic, can be empty in direct mapping phase)
      - `connectionId` string: ID of the target connection; used to resolve target type and metadata
      - `softDeleteColumn` string: Soft delete column name for the target
      - `columnMappings` ColumnMapping[]: List of column mappings for the target
        - `sourceColumnName` string
        - `targetColumnName` string
        - `sourceColType` string
        - `targetColType` string
        - `action` 'Copy' | 'Ignore' | 'SoftDelete'
        - `state` 'TARGET_COLUMN_DATATYPE_NOT_SUPPORTED' | 'SOURCE_COLUMN_DATATYPE_NOT_SUPPORTED' | 'BOTH_TARGET_AND_SOURCE_COLUMN_DATATYPE_NOT_SUPPORTED' | 'BOTH_TARGET_AND_SOURCE_COLUMN_DATATYPE_SUPPORTED' | 'SOURCE_COLUMN_DATATYPE_SUPPORTED' | 'TARGET_AND_SOURCE_COLUMN_DATATYPE_NOT_COMPATIBLE' | 'NOT_CHECKED'
        - `targetColumnNullableState` 'NULLABLE_WITH_DEFAULT_VALUE' | 'NULLABLE_WITHOUT_DEFAULT_VALUE' | 'NON_NULLABLE_WITH_DEFAULT_VALUE' | 'NON_NULLABLE_WITHOUT_DEFAULT_VALUE'
        - `sourceColumnNullableState` 'NULLABLE_WITH_DEFAULT_VALUE' | 'NULLABLE_WITHOUT_DEFAULT_VALUE' | 'NON_NULLABLE_WITH_DEFAULT_VALUE' | 'NON_NULLABLE_WITHOUT_DEFAULT_VALUE'
        - `key` boolean
        - `duplicate` boolean
        - `expression` boolean
        - `fieldMappingType` 'FIELD' | 'EXPRESSION' | 'RRN'
      - `includedCDCRowMetadata` string[]: List of CDC row metadata fields to include for the target
      - `type` 'RDBMS' | 'KAFKA' | 'SCHEMA_REGISTRY': The type of the target mapping (e.g., RDBMS, KAFKA, SCHEMA_REGISTRY)

## Response `201`

Table mappings configured successfully

- ContinuousTableMappingResponse: Response model containing table mapping information for continuous replication pipelines
  - `id` string: Unique identifier of the table mapping
  - `sourceDatabase` string: Name of the source database
  - `sourceSchema` string: Name of the source schema
  - `sourceTable` string: Name of the source table
  - `targetDatabase` string: Name of the target database
  - `targetSchema` string: Name of the target schema
  - `targetTable` string: Name of the target table
  - `targetTopic` string: Name of the target topic
  - `targetSubject` string: Name of the target subject for schema registry
  - `type` 'TARGET_EXISTS_WITH_MATCH' | 'TARGET_EXISTS_WITHOUT_MATCH' | 'TARGET_DOES_NOT_EXIST' | 'BOTH_TARGET_AND_SUBJECT_EXISTS_WITH_MATCH' | 'TARGET_EXISTS_WITHOUT_MATCH_AND_SUBJECT_EXISTS_WITH_MATCH' | 'TARGET_DOES_NOT_EXIST_AND_SUBJECT_EXISTS_WITH_MATCH' | 'TARGET_EXISTS_WITH_MATCH_AND_SUBJECT_EXISTS_WITHOUT_MATCH' | 'BOTH_TARGET_AND_SUBJECT_EXISTS_WITHOUT_MATCH' | 'TARGET_DOES_NOT_EXIST_AND_SUBJECT_EXISTS_WITHOUT_MATCH' | 'TARGET_EXISTS_WITH_MATCH_AND_SUBJECT_DOES_NOT_EXIST' | 'TARGET_EXISTS_WITHOUT_MATCH_AND_SUBJECT_DOES_NOT_EXIST' | 'BOTH_TARGET_AND_SUBJECT_DOES_NOT_EXIST': Type of the table mapping
  - `hasCustomColMappings` boolean: Flag indicating whether the table has custom column mappings
  - `includedCDCRowMetadata` string[]: Metadata fields to include with change data records for this table mapping configuration, this overrides the Metadata fields defined at the pipeline level
  - `schemaVersion` string: Version of the schema used for this mapping
  - `softDeleteColumnName` string: Name of the column used for soft deletes
  - `columnMappings` ColumnMappingResponse[]: List of column mappings for this table
    - `sourceColumnName` string: Name of the source column
    - `targetColumnName` string: Name of the target column
    - `sourceColType` string: Data type of the source column
    - `targetColType` string: Data type of the target column
    - `isDistributionKey` boolean: Flag indicating if this column is used as a distribution key
    - `action` 'Copy' | 'Ignore' | 'SoftDelete': Action to be performed for this column mapping
    - `state` 'TARGET_COLUMN_DATATYPE_NOT_SUPPORTED' | 'SOURCE_COLUMN_DATATYPE_NOT_SUPPORTED' | 'BOTH_TARGET_AND_SOURCE_COLUMN_DATATYPE_NOT_SUPPORTED' | 'BOTH_TARGET_AND_SOURCE_COLUMN_DATATYPE_SUPPORTED' | 'SOURCE_COLUMN_DATATYPE_SUPPORTED' | 'TARGET_AND_SOURCE_COLUMN_DATATYPE_NOT_COMPATIBLE' | 'NOT_CHECKED': Current state of the column mapping
    - `sourceColumnNullableState` 'NULLABLE_WITH_DEFAULT_VALUE' | 'NULLABLE_WITHOUT_DEFAULT_VALUE' | 'NON_NULLABLE_WITH_DEFAULT_VALUE' | 'NON_NULLABLE_WITHOUT_DEFAULT_VALUE': Nullable state of the source column
    - `targetColumnNullableState` 'NULLABLE_WITH_DEFAULT_VALUE' | 'NULLABLE_WITHOUT_DEFAULT_VALUE' | 'NON_NULLABLE_WITH_DEFAULT_VALUE' | 'NON_NULLABLE_WITHOUT_DEFAULT_VALUE': Nullable state of the target column
    - `metadataMapping` boolean: Flag indicating if this is a change data records metadata mapping
    - `mappingType` 'FIELD' | 'EXPRESSION' | 'RRN': Type of mapping if this is FIELD / EXPRESSION / RRN

## Other responses

- `400`: Bad Request - Invalid mapping configuration
- `401`: Unauthorized - Authentication required, valid credentials not provided
- `403`: Forbidden - User lacks 'replication-pipeline::create' or 'replication-pipeline::update' when permission harmonization is enabled, or legacy 'replication-pipeline::manage' otherwise
- `404`: Not Found - Project or pipeline does not exist
- `500`: Internal Server Error - Processing failures

---

[API](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service.md) · [All operations](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/revisions/2d2629f4987d?raw)
