> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update DQ tags for a table

> Update (delete) DQ tags for columns in a table. This is a delete-only operation: for each column in the request, tags in the DB that are NOT in the request will be deleted. Columns not in the request are unchanged. Request tags not in DB are ignored.



## OpenAPI

````yaml /openapi/em-data-readiness-v2.yaml put /api/data-readiness/data-assets/tables/dq-tags
openapi: 3.1.0
info:
  title: EM Data Readiness Service
  description: Data Readiness Service API for managing workflows, metrics, and data quality
  version: 4.3.0-dev1
servers: []
security:
  - BearerAuth: []
tags:
  - name: Health
    description: Service health monitoring. Check service status and version information.
  - name: Root
    description: Root endpoint providing service information and navigation links.
  - name: Configuration
    description: Service configuration endpoints. View current configuration values.
  - name: Workflows
    description: >-
      Workflow configuration and execution management. Create, configure, and
      run data quality workflows including definitions, configurations, runs,
      and tasks.
  - name: Data Assets
    description: >-
      Data catalog entity management. Manage databases, schemas, and tables
      metadata.
  - name: Metrics
    description: >-
      Data quality metrics and scorecards. Calculate scores, view trends, and
      analyze dimensions.
  - name: Violations
    description: >-
      Data quality violation management. View, acknowledge, and remediate
      detected violations.
  - name: Glossary
    description: >-
      Business glossary management. Create, verify, and organize business terms
      and definitions.
paths:
  /api/data-readiness/data-assets/tables/dq-tags:
    put:
      tags:
        - Data Assets
      summary: Update DQ tags for a table
      description: >-
        Update (delete) DQ tags for columns in a table. This is a delete-only
        operation: for each column in the request, tags in the DB that are NOT
        in the request will be deleted. Columns not in the request are
        unchanged. Request tags not in DB are ignored.
      operationId: update_table_dq_tags
      parameters:
        - name: fqn
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: >-
              Fully qualified name of the table (e.g.,
              service.database.schema.table)
            title: Fqn
          description: >-
            Fully qualified name of the table (e.g.,
            service.database.schema.table)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableDqTagsUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DqTagsUpdateResult'
        '404':
          description: Table not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    TableDqTagsUpdateRequest:
      properties:
        columns:
          items:
            $ref: '#/components/schemas/ColumnDqTagUpdate'
          type: array
          minItems: 1
          title: Columns
          description: Columns with their desired DQ tag state.
      type: object
      required:
        - columns
      title: TableDqTagsUpdateRequest
      description: >-
        Request model for updating (deleting) DQ tags on a table's columns.


        This is a full-replacement delete-only operation:

        - For each column in the request: delete DB tags whose IDs are NOT in
        data_quality list

        - Columns NOT in request: unchanged (their tags are preserved)

        - Tags in request that don't exist in DB: ignored (no adding)
    DqTagsUpdateResult:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the update completed successfully (no errors)
        table_fqn:
          type: string
          title: Table Fqn
          description: Fully qualified table name
        columns_processed:
          type: integer
          title: Columns Processed
          description: Number of columns processed from request
          default: 0
        tags_deleted:
          type: integer
          title: Tags Deleted
          description: Number of DQ tags deleted
          default: 0
        tags_preserved:
          type: integer
          title: Tags Preserved
          description: Number of DQ tags preserved (not deleted)
          default: 0
        tags_not_found:
          type: integer
          title: Tags Not Found
          description: Number of tag IDs in request that didn't exist in DB (ignored)
          default: 0
        errors:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Errors
          description: Error messages if any
      type: object
      required:
        - success
        - table_fqn
      title: DqTagsUpdateResult
      description: >-
        Result of updating DQ tags for a table.


        The `success` field indicates whether the operation completed without
        errors:

        - `True`: All requested deletions were processed successfully

        - `False`: One or more errors occurred (e.g., invalid UUID format)


        Note: Even when `success=False`, some tags may have been successfully
        deleted.

        Check `tags_deleted` for the actual count of deleted tags. The `errors`
        field

        contains details about what failed.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorInfo'
          description: >-
            Error information object containing code, message, and optional
            details
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Request ID for debugging and support
          examples:
            - req_abc123xyz
      type: object
      required:
        - error
      title: ErrorResponse
      description: >-
        Standard error response model for API errors.


        Matches the structure returned by _handle_service_error in
        workflows/routes.py.

        The actual API response format is:

        {
            "error": {
                "code": "ERROR_CODE",
                "message": "Error message",
                "details": {...}
            },
            "request_id": "optional-request-id"
        }
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ColumnDqTagUpdate:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: Column name
        data_quality:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Data Quality
          description: >-
            DQ tags to keep. Each dict must have 'id' (DqTaggingRun UUID). Tags
            in DB not in this list will be deleted.
      type: object
      required:
        - name
      title: ColumnDqTagUpdate
      description: Column with its desired DQ tags state for update operations.
    ErrorInfo:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Error code identifier (e.g., 'WORKFLOW_NOT_FOUND',
            'VALIDATION_ERROR')
          examples:
            - WORKFLOW_NOT_FOUND
        message:
          type: string
          title: Message
          description: Human-readable error message
          examples:
            - >-
              Workflow configuration with id
              '123e4567-e89b-12d3-a456-426614174000' not found
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Additional error details as a dictionary (flexible structure for
            business logic errors)
          examples:
            - workflow_id: 123e4567-e89b-12d3-a456-426614174000
      type: object
      required:
        - code
        - message
      title: ErrorInfo
      description: >-
        Nested error information object.


        Note: This model uses an untyped dict for `details` to match the
        flexible error

        structure used throughout the service layer (see WorkflowServiceError
        and similar).

        This is distinct from ErrorDetail, which is used for structured
        validation errors.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Authorization: Bearer <token>`. The JWT must contain valid
        client_id, and project_id claims for tenant isolation and SDK routing.

````