Appearance
dbo.endataCostCentres
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.endataCostCentres.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | ID | int | no | identity | Primary key identifier for this cost centre record. |
| 2 | CostCentre | nvarchar(200) | no | Name/code of the cost centre as sourced from Endata. | |
| 3 | Type | nvarchar(100) | yes | Category/classification of the cost centre as sourced from Endata. | |
| 4 | NormalizedName | nvarchar(200) | yes | computed | Computed lowercase, trimmed version of CostCentre used for case-insensitive matching/deduplication. |
| 5 | NameHash | varbinary(8000) | yes | computed | Computed SHA2_256 hash of the normalized cost centre name, used to quickly detect duplicate or changed names. |
| 6 | IsStale | bit | no | Flag (1/0) indicating whether this record was not seen in the most recent Endata sync and should be treated as outdated. | |
| 7 | CreatedAt | datetime2(7) | no | Timestamp when this record was first created in this table. | |
| 8 | UpdatedAt | datetime2(7) | yes | Timestamp when this record was last updated by an Endata sync. | |
| 9 | LastSeenAt | datetime2(7) | yes | Timestamp of the most recent Endata sync in which this record was present. |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__endataCo__3214EC27B7118254 | CLUSTERED | yes | yes | ID | ||
| IX_endataCostCentres_NameHash | NONCLUSTERED | yes | NameHash | |||
| IX_endataCostCentres_Normalized | NONCLUSTERED | NormalizedName |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.endataCostCentreDescriptions.CostCentreId | dbo.endataCostCentres.ID | medium |
Referenced by
Procedures: dbo.spSyncCostCentreDescriptions

