Skip to content

Able to add duplicate rows with same primary key in dimension table #12284

@madhusudhannsn

Description

@madhusudhannsn

Hi, I see my dimension table with the following configuration is allowing duplicate rows with same primary key.
Is this designed by choice or a bug?

Schema:

{
    "schemaName": "dim_table_v1",
    "dimensionFieldSpecs": [
      {
        "name": "userId",
        "dataType": "STRING"
      },
      {
        "name": "address",
        "dataType": "STRING",
        "singleValueField": false
      },
      {
        "name": "user_description",
        "dataType": "STRING"
      }
    ],
    "dateTimeFieldSpecs": [
        {
            "name": "last_modified",
            "dataType": "STRING",
            "format": "1:MILLISECONDS:EPOCH",
            "granularity": "1:MILLISECONDS"
        }
    ],
    "primaryKeyColumns": ["userId"]
  }

TableConfig:

{
   "tableName": "dim_table_v1",
   "tableType": "OFFLINE",
   "segmentsConfig": {
       "schemaName": "dim_table_v1",
       "segmentPushType": "REFRESH",
       "retentionTimeUnit": "DAYS",
       "retentionTimeValue": "90",
       "timeType": "DAYS",
       "replication": "1",
       "minimizeDataMovement": false,
       "segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy",
       "peerSegmentDownloadScheme": "http"
   },
   "tenants": {},
   "tableIndexConfig": {
       "invertedIndexColumns": [
           "userId"
       ],
       "rangeIndexVersion": 1,
       "loadMode": "MMAP",
       "enableDefaultStarTree": false,
       "aggregateMetrics": false,
       "nullHandlingEnabled": false,
       "createInvertedIndexDuringSegmentGeneration": false,
       "autoGeneratedInvertedIndex": false,
       "enableDynamicStarTreeCreation": false,
       "optimizeDictionaryForMetrics": false,
       "noDictionarySizeRatioThreshold": 0.0
   },
   "metadata": {},
   "isDimTable": true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions