Skip to main content
Create assignment tables that store records of what entities have been assigned what configuration.

Before You Begin

Before creating an assignment table, ensure you have:
  • An API access token with appropriate permissions
  • Created the entity you want to track assignments for
  • Prepared a SQL query that selects assignment rows from your data warehouse
  • Identified the columns for timestamp, entity ID, exposure key, and variant key

Create an Assignment Table

Create an assignment table with automatic data delivery:
curl -X POST "https://api.confidence.dev/v1/assignmentTables" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "My Assignment Table",
    "dataDeliveredUntilUpdateStrategyConfig": {
      "strategy": "AUTOMATIC",
      "automaticUpdateConfig": {
        "incrementDuration": "P13H",
        "commitDelay": "P13H"
      }
    },
    "sql": "SELECT * FROM my_table",
    "entityColumnMapping": {
      "column": {
        "name": "user_id"
      },
      "entity": "entities/user"
    },
    "timestampColumn": {
      "name": "timestamp"
    },
    "exposureKeyColumn": {
      "name": "experiment_id"
    },
    "variantKeyColumn": {
      "name": "group"
    }
  }'

Column Mapping Fields

  • entityColumnMapping: Maps the column containing entity IDs to the entity resource
    • column.name: Name of the column in your query results
    • entity: Resource name of the entity (for example, entities/user)
  • timestampColumn: Column containing the assignment timestamp
  • exposureKeyColumn: Column identifying which experiment the assignment belongs to
  • variantKeyColumn: Column identifying which variant was assigned

Data Delivery Strategy

Configure how Confidence updates data from your warehouse:
"dataDeliveredUntilUpdateStrategyConfig": {
  "strategy": "AUTOMATIC",
  "automaticUpdateConfig": {
    "incrementDuration": "P13H",
    "commitDelay": "P13H"
  }
}
  • incrementDuration: How frequently to check for new data
  • commitDelay: Buffer time before considering data complete

Next Steps

After creating an assignment table: