3

I am running the below query to create a dimension table; however the identity column is not yielding sequential values; the values are very random. Any reason for this?

I have tried a stored procedure and also a manual insert; but the result is the same

CREATE TABLE Dim.CDIM_State 
(   
    intStateDimKey int IDENTITY(1,1) NOT NULL,
    txtState nvarchar(250),
    dtCreatedOn datetime,
    dtModifiedOn datetime
)
WITH
(
DISTRIBUTION = REPLICATE,
CLUSTERED COLUMNSTORE INDEX
)

The output is something like this; I expect sequential values viz. 1,2,3,4,5

enter image description here

Ardalan Shahgholi
  • 11,967
  • 21
  • 108
  • 144
Prathamesh
  • 97
  • 2
  • 8

1 Answers1

8

That is correct. There are separate counters for each distribution.

It won't affect your dimension, the values will always be unique.

Ron Dunn
  • 2,971
  • 20
  • 27