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

# Update AssignmentTable

> Update an assignment table.



## OpenAPI

````yaml /api/metrics/api/assignment-table.openapi.json patch /v1/assignmentTables/{assignmentTable}
openapi: 3.1.0
info:
  title: Confidence Assignment-table API
  version: 1.0.0
  description: API documentation for assignment-table
servers: []
security: []
paths:
  /v1/assignmentTables/{assignmentTable}:
    patch:
      summary: Update AssignmentTable
      description: Update an assignment table.
      operationId: AssignmentTable.update
      parameters:
        - name: assignmentTable
          in: path
          required: true
          schema:
            type: string
        - name: updateMask
          in: query
          required: false
          description: |-
            The list of fields to update.
             Fields are specified relative to the AssignmentTable
             (e.g. `display_name`, `sql`; *not* `assignment_table.display_name` or `assignment_table.sql`).
          schema:
            type: object
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: |-
                    Unique identifier of the assignment table.
                     For example: `assignmentTables/0smva5nxuhv4yts6paxt`
                sql:
                  type: string
                  description: >-
                    A data warehouse-specific query to get the data of the
                    assignment table.
                displayName:
                  type: string
                  description: Human friendly name of the assignment table.
                description:
                  type: string
                  description: Human readable description of the assignment table.
                timestampTruncation:
                  type: object
                  properties:
                    window:
                      type: string
                      enum:
                        - TRUNCATION_WINDOW_UNSPECIFIED
                        - TRUNCATION_WINDOW_HOUR
                        - TRUNCATION_WINDOW_DAY
                      description: The window that time has been truncated to.
                    behaviour:
                      type: string
                      enum:
                        - TRUNCATION_BEHAVIOR_UNSPECIFIED
                        - TRUNCATION_BEHAVIOR_START
                      description: How time was truncated.
                    timeZone:
                      type: string
                      enum:
                        - TRUNCATION_TIME_ZONE_UNSPECIFIED
                        - TRUNCATION_TIMEZONE_UTC
                      description: |-
                        The timezone that the truncation was performed in.
                         
                  required:
                    - window
                    - behaviour
                    - timeZone
                  description: Defines how time is truncated in the timestamp column.
                dimensions:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Name of the column.
                      type:
                        type: string
                        enum:
                          - COLUMN_TYPE_UNSPECIFIED
                          - COLUMN_TYPE_STRING
                          - COLUMN_TYPE_INT32
                          - COLUMN_TYPE_INT64
                          - COLUMN_TYPE_DOUBLE
                          - COLUMN_TYPE_BOOLEAN
                          - COLUMN_TYPE_DATE
                          - COLUMN_TYPE_TIMESTAMP
                          - COLUMN_TYPE_BYTES
                          - COLUMN_TYPE_TIMESTAMP_WITHOUT_TIMEZONE
                          - COLUMN_TYPE_DECIMAL
                          - COLUMN_TYPE_HLL_SKETCH
                        description: >-
                          Type of the column, will be converted to a data
                          warehouse-specific type.
                      repeated:
                        type: boolean
                        description: Determined whether the column is an array.
                    required:
                      - name
                  description: Mapping between columns and dimensions of the entities.
                assignmentDataDeliveredUntilTime:
                  type: object
                  description: >-
                    The current maximum time point where there is available data
                    for the
                     assignment table.
                dataDeliveredUntilUpdateStrategyConfig:
                  type: object
                  properties:
                    disableEmptyPartitions:
                      type: boolean
                      description: If set to true, empty partitions are not allowed.
                    strategy:
                      type: string
                      enum:
                        - STRATEGY_UNSPECIFIED
                        - MANUAL
                        - AUTOMATIC
                      description: The strategy to use
                    automaticUpdateConfig:
                      type: object
                      properties:
                        incrementDuration:
                          type: object
                          description: The size of the window to increment with
                        commitDelay:
                          type: object
                          description: >-
                            How long the window must be consistent before
                            committing
                        changeThreshold:
                          type: object
                          properties:
                            value:
                              type: string
                              description: |-
                                The decimal value, as a string.

                                 The string representation consists of an optional sign, `+` (`U+002B`)
                                 or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
                                 ("the integer"), optionally followed by a fraction, optionally followed
                                 by an exponent.

                                 The fraction consists of a decimal point followed by zero or more decimal
                                 digits. The string must contain at least one digit in either the integer
                                 or the fraction. The number formed by the sign, the integer and the
                                 fraction is referred to as the significand.

                                 The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
                                 followed by one or more decimal digits.

                                 Services **should** normalize decimal values before storing them by:

                                   - Removing an explicitly-provided `+` sign (`+2.5` -{">"} `2.5`).
                                   - Replacing a zero-length integer value with `0` (`.5` -{">"} `0.5`).
                                   - Coercing the exponent character to lower-case (`2.5E8` -{">"} `2.5e8`).
                                   - Removing an explicitly-provided zero exponent (`2.5e0` -{">"} `2.5`).

                                 Services **may** perform additional normalization based on its own needs
                                 and the internal decimal implementation selected, such as shifting the
                                 decimal point and exponent value together (example: `2.5e-1` {"<"}-{">"} `0.25`).
                                 Additionally, services **may** preserve trailing zeroes in the fraction
                                 to indicate increased precision, but are not required to do so.

                                 Note that only the `.` character is supported to divide the integer
                                 and the fraction; `,` **should not** be supported regardless of locale.
                                 Additionally, thousand separators **should not** be supported. If a
                                 service does support them, values **must** be normalized.

                                 The ENBF grammar is:

                                     DecimalString =
                                       [Sign] Significand [Exponent];

                                     Sign = '+' | '-';

                                     Significand =
                                       Digits ['.'] [Digits] | [Digits] '.' Digits;

                                     Exponent = ('e' | 'E') [Sign] Digits;

                                     Digits = \{ '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };

                                 Services **should** clearly document the range of supported values, the
                                 maximum supported precision (total number of digits), and, if applicable,
                                 the scale (number of digits after the decimal point), as well as how it
                                 behaves when receiving out-of-bounds values.

                                 Services **may** choose to accept values passed as input even when the
                                 value has a higher precision or scale than the service supports, and
                                 **should** round the value to fit the supported scale. Alternatively, the
                                 service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
                                 if precision would be lost.

                                 Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
                                 gRPC) if the service receives a value outside of the supported range.
                          description: >-
                            The relative threshold for the window to the same.
                            If set to 0.01 it means that
                             if (new_window - old_window) / new_window {"<"} 0.01 the window will be considered the same.
                      required:
                        - commitDelay
                      description: Automatic window increments
                    dailyUpdateConfig:
                      type: object
                      properties:
                        maxZeroDuration:
                          type: object
                          description: >-
                            Maximum amount of time to wait for a new partition
                            when its row count is 0, the partition
                             will be considered empty and Confidence will move on to the next one. Default is 24 hours.
                      description: >-
                        Specifies that the data is written daily. Confidence
                        will detect that data has been written
                    hourlyUpdateConfig:
                      type: object
                      properties:
                        maxZeroDuration:
                          type: object
                          description: >-
                            Maximum amount of time to wait for a new partition
                            when its row count is 0, the partition
                             will be considered empty and Confidence will move on to the next one. Default is 6 hours.
                      description: >-
                        Specifies that the data is written hourly. Confidence
                        will detect that data has been written
                  required:
                    - strategy
                  description: >-
                    The strategy for updating
                    `assignment_data_delivered_until_time` in the
                     assignment table.
                labels:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: string
                  description: Custom labels for this assignment table.
                owner:
                  type: string
                  description: >-
                    The owner of the resource. If not set will default to the
                    creator.
              required:
                - sql
                - displayName
        required: true
      responses:
        '200':
          description: Returns a [AssignmentTable](/api-reference/schemas/assignmenttable).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/confidence.metrics.v1.AssignmentTable'
      security:
        - admin: []
      servers:
        - url: https://metrics.eu.confidence.dev
        - url: https://metrics.us.confidence.dev
        - url: https://metrics.confidence.dev
components:
  schemas:
    confidence.metrics.v1.AssignmentTable:
      title: AssignmentTable
      type: object
      description: >-
        An assignment table is a description of a dataset of how entities have
        been
         assigned to variants.
      properties:
        name:
          type: string
          description: |-
            Unique identifier of the assignment table.
             For example: `assignmentTables/0smva5nxuhv4yts6paxt`
        sql:
          type: string
          description: >-
            A data warehouse-specific query to get the data of the assignment
            table.
        displayName:
          type: string
          description: Human friendly name of the assignment table.
        description:
          type: string
          description: Human readable description of the assignment table.
        entityColumn:
          type: object
          properties:
            name:
              type: string
              description: Name of the column.
            type:
              type: string
              enum:
                - COLUMN_TYPE_UNSPECIFIED
                - COLUMN_TYPE_STRING
                - COLUMN_TYPE_INT32
                - COLUMN_TYPE_INT64
                - COLUMN_TYPE_DOUBLE
                - COLUMN_TYPE_BOOLEAN
                - COLUMN_TYPE_DATE
                - COLUMN_TYPE_TIMESTAMP
                - COLUMN_TYPE_BYTES
                - COLUMN_TYPE_TIMESTAMP_WITHOUT_TIMEZONE
                - COLUMN_TYPE_DECIMAL
                - COLUMN_TYPE_HLL_SKETCH
              description: >-
                Type of the column, will be converted to a data
                warehouse-specific type.
            repeated:
              type: boolean
              description: Determined whether the column is an array.
          required:
            - name
          description: The column of the assignment table that represents the entity
        timestampColumn:
          type: object
          properties:
            name:
              type: string
              description: Name of the column.
            type:
              type: string
              enum:
                - COLUMN_TYPE_UNSPECIFIED
                - COLUMN_TYPE_STRING
                - COLUMN_TYPE_INT32
                - COLUMN_TYPE_INT64
                - COLUMN_TYPE_DOUBLE
                - COLUMN_TYPE_BOOLEAN
                - COLUMN_TYPE_DATE
                - COLUMN_TYPE_TIMESTAMP
                - COLUMN_TYPE_BYTES
                - COLUMN_TYPE_TIMESTAMP_WITHOUT_TIMEZONE
                - COLUMN_TYPE_DECIMAL
                - COLUMN_TYPE_HLL_SKETCH
              description: >-
                Type of the column, will be converted to a data
                warehouse-specific type.
            repeated:
              type: boolean
              description: Determined whether the column is an array.
          required:
            - name
          description: >-
            The column of the assignment table that represents the time the
            assignment
             occurred.
        exposureKeyColumn:
          type: object
          properties:
            name:
              type: string
              description: Name of the column.
            type:
              type: string
              enum:
                - COLUMN_TYPE_UNSPECIFIED
                - COLUMN_TYPE_STRING
                - COLUMN_TYPE_INT32
                - COLUMN_TYPE_INT64
                - COLUMN_TYPE_DOUBLE
                - COLUMN_TYPE_BOOLEAN
                - COLUMN_TYPE_DATE
                - COLUMN_TYPE_TIMESTAMP
                - COLUMN_TYPE_BYTES
                - COLUMN_TYPE_TIMESTAMP_WITHOUT_TIMEZONE
                - COLUMN_TYPE_DECIMAL
                - COLUMN_TYPE_HLL_SKETCH
              description: >-
                Type of the column, will be converted to a data
                warehouse-specific type.
            repeated:
              type: boolean
              description: Determined whether the column is an array.
          required:
            - name
          description: >-
            The column of the table that represents what the group of variants
            that the
             entity was assigned to, this would typically be the rule id or the flag
             name.
        variantKeyColumn:
          type: object
          properties:
            name:
              type: string
              description: Name of the column.
            type:
              type: string
              enum:
                - COLUMN_TYPE_UNSPECIFIED
                - COLUMN_TYPE_STRING
                - COLUMN_TYPE_INT32
                - COLUMN_TYPE_INT64
                - COLUMN_TYPE_DOUBLE
                - COLUMN_TYPE_BOOLEAN
                - COLUMN_TYPE_DATE
                - COLUMN_TYPE_TIMESTAMP
                - COLUMN_TYPE_BYTES
                - COLUMN_TYPE_TIMESTAMP_WITHOUT_TIMEZONE
                - COLUMN_TYPE_DECIMAL
                - COLUMN_TYPE_HLL_SKETCH
              description: >-
                Type of the column, will be converted to a data
                warehouse-specific type.
            repeated:
              type: boolean
              description: Determined whether the column is an array.
          required:
            - name
          description: >-
            The column of the table that represents the variant that was
            assigned.
        timestampTruncation:
          type: object
          properties:
            window:
              type: string
              enum:
                - TRUNCATION_WINDOW_UNSPECIFIED
                - TRUNCATION_WINDOW_HOUR
                - TRUNCATION_WINDOW_DAY
              description: The window that time has been truncated to.
            behaviour:
              type: string
              enum:
                - TRUNCATION_BEHAVIOR_UNSPECIFIED
                - TRUNCATION_BEHAVIOR_START
              description: How time was truncated.
            timeZone:
              type: string
              enum:
                - TRUNCATION_TIME_ZONE_UNSPECIFIED
                - TRUNCATION_TIMEZONE_UTC
              description: |-
                The timezone that the truncation was performed in.
                 
          required:
            - window
            - behaviour
            - timeZone
          description: Defines how time is truncated in the timestamp column.
        dimensions:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the column.
              type:
                type: string
                enum:
                  - COLUMN_TYPE_UNSPECIFIED
                  - COLUMN_TYPE_STRING
                  - COLUMN_TYPE_INT32
                  - COLUMN_TYPE_INT64
                  - COLUMN_TYPE_DOUBLE
                  - COLUMN_TYPE_BOOLEAN
                  - COLUMN_TYPE_DATE
                  - COLUMN_TYPE_TIMESTAMP
                  - COLUMN_TYPE_BYTES
                  - COLUMN_TYPE_TIMESTAMP_WITHOUT_TIMEZONE
                  - COLUMN_TYPE_DECIMAL
                  - COLUMN_TYPE_HLL_SKETCH
                description: >-
                  Type of the column, will be converted to a data
                  warehouse-specific type.
              repeated:
                type: boolean
                description: Determined whether the column is an array.
            required:
              - name
          description: Mapping between columns and dimensions of the entities.
        assignmentDataDeliveredUntilTime:
          type: object
          description: |-
            The current maximum time point where there is available data for the
             assignment table.
        partitionedUpdateStrategyState:
          type: object
          properties:
            currentPartitionLastCheckTime:
              type: object
            existsCheckDuration:
              type: object
            state:
              type: string
              enum:
                - STATE_UNSPECIFIED
                - NEXT_PARTITION_IS_IN_THE_FUTURE
                - PARTITIONS_USUALLY_ARRIVE_LATER
                - PARTITION_DOES_NOT_EXIST
            usualLateness:
              type: object
            count:
              type: integer
        state:
          type: string
          enum:
            - TABLE_STATE_UNSPECIFIED
            - TABLE_STATE_CREATING
            - TABLE_STATE_ACTIVE
            - TABLE_STATE_FAILED
            - TABLE_STATE_UPDATING
            - TABLE_STATE_DELETED
          description: The current state of the assignment table.
        error:
          type: object
          properties:
            message:
              type: string
              description: Overall description of the error.
            details:
              type: array
              items:
                type: string
              description: Specific details of the error.
          description: Indicates whether an errors has occurred.
        dataDeliveredUntilUpdateStrategyConfig:
          type: object
          properties:
            disableEmptyPartitions:
              type: boolean
              description: If set to true, empty partitions are not allowed.
            strategy:
              type: string
              enum:
                - STRATEGY_UNSPECIFIED
                - MANUAL
                - AUTOMATIC
              description: The strategy to use
            automaticUpdateConfig:
              type: object
              properties:
                incrementDuration:
                  type: object
                  description: The size of the window to increment with
                commitDelay:
                  type: object
                  description: How long the window must be consistent before committing
                changeThreshold:
                  type: object
                  properties:
                    value:
                      type: string
                      description: |-
                        The decimal value, as a string.

                         The string representation consists of an optional sign, `+` (`U+002B`)
                         or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
                         ("the integer"), optionally followed by a fraction, optionally followed
                         by an exponent.

                         The fraction consists of a decimal point followed by zero or more decimal
                         digits. The string must contain at least one digit in either the integer
                         or the fraction. The number formed by the sign, the integer and the
                         fraction is referred to as the significand.

                         The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
                         followed by one or more decimal digits.

                         Services **should** normalize decimal values before storing them by:

                           - Removing an explicitly-provided `+` sign (`+2.5` -{">"} `2.5`).
                           - Replacing a zero-length integer value with `0` (`.5` -{">"} `0.5`).
                           - Coercing the exponent character to lower-case (`2.5E8` -{">"} `2.5e8`).
                           - Removing an explicitly-provided zero exponent (`2.5e0` -{">"} `2.5`).

                         Services **may** perform additional normalization based on its own needs
                         and the internal decimal implementation selected, such as shifting the
                         decimal point and exponent value together (example: `2.5e-1` {"<"}-{">"} `0.25`).
                         Additionally, services **may** preserve trailing zeroes in the fraction
                         to indicate increased precision, but are not required to do so.

                         Note that only the `.` character is supported to divide the integer
                         and the fraction; `,` **should not** be supported regardless of locale.
                         Additionally, thousand separators **should not** be supported. If a
                         service does support them, values **must** be normalized.

                         The ENBF grammar is:

                             DecimalString =
                               [Sign] Significand [Exponent];

                             Sign = '+' | '-';

                             Significand =
                               Digits ['.'] [Digits] | [Digits] '.' Digits;

                             Exponent = ('e' | 'E') [Sign] Digits;

                             Digits = \{ '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };

                         Services **should** clearly document the range of supported values, the
                         maximum supported precision (total number of digits), and, if applicable,
                         the scale (number of digits after the decimal point), as well as how it
                         behaves when receiving out-of-bounds values.

                         Services **may** choose to accept values passed as input even when the
                         value has a higher precision or scale than the service supports, and
                         **should** round the value to fit the supported scale. Alternatively, the
                         service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
                         if precision would be lost.

                         Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
                         gRPC) if the service receives a value outside of the supported range.
                  description: >-
                    The relative threshold for the window to the same. If set to
                    0.01 it means that
                     if (new_window - old_window) / new_window {"<"} 0.01 the window will be considered the same.
              required:
                - commitDelay
              description: Automatic window increments
            dailyUpdateConfig:
              type: object
              properties:
                maxZeroDuration:
                  type: object
                  description: >-
                    Maximum amount of time to wait for a new partition when its
                    row count is 0, the partition
                     will be considered empty and Confidence will move on to the next one. Default is 24 hours.
              description: >-
                Specifies that the data is written daily. Confidence will detect
                that data has been written
            hourlyUpdateConfig:
              type: object
              properties:
                maxZeroDuration:
                  type: object
                  description: >-
                    Maximum amount of time to wait for a new partition when its
                    row count is 0, the partition
                     will be considered empty and Confidence will move on to the next one. Default is 6 hours.
              description: >-
                Specifies that the data is written hourly. Confidence will
                detect that data has been written
          required:
            - strategy
          description: >-
            The strategy for updating `assignment_data_delivered_until_time` in
            the
             assignment table.
        schemaValidationJob:
          type: string
          description: >-
            Resource name of the sql job that was used to validate the schema of
            the
             fact table.
        createTime:
          type: object
          description: Time when the assignment table was first created.
        updateTime:
          type: object
          description: Time when the assignment table was last updated.
        deleteTime:
          type: object
          description: Time when the assignment table was deleted.
        labels:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          description: Custom labels for this assignment table.
        creator:
          type: string
          description: Reference to the identity that created this assignment table.
        updater:
          type: string
          description: Reference to the identity that last updated this assignment table.
        owner:
          type: string
          description: The owner of the resource. If not set will default to the creator.
        systemCreated:
          type: boolean
          description: If this table is an automatically created internal table.
      required:
        - sql
        - displayName
        - entityColumn
        - timestampColumn
        - exposureKeyColumn
        - variantKeyColumn
        - state
        - schemaValidationJob
        - createTime
        - updateTime
        - creator
        - updater
  securitySchemes:
    admin:
      type: http
      scheme: bearer

````