ssas.IndexColumn_union - V

type: V ( view ), modify_date: 2021-09-01 13:44:22

RepoObject_guid: 989CF1C3-0B08-EC11-8515-A81E8446D5B0

Description

Examples

Entity Diagram

entity-ssas.indexcolumn_union

Columns

Table 1. Columns of ssas.IndexColumn_union - V
PK Column Name Data Type NULL? ID

nvarchar(128)

NOT NULL

nvarchar(128)

NOT NULL

int

NOT NULL

nvarchar(450)

NULL

int

NOT NULL

bit

NOT NULL

bit

NOT NULL

uniqueidentifier

NOT NULL

uniqueidentifier

NOT NULL

nvarchar(128)

NOT NULL

nvarchar(500)

NULL

Foreign Key Diagram

entity_1_1_fk-ssas.indexcolumn_union

References

Object Reference Diagram - 1 1

entity_1_1_objectref-ssas.indexcolumn_union

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-ssas.indexcolumn_union

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-ssas.indexcolumn_union

Column Reference Diagram

entity_1_1_colref-ssas.indexcolumn_union

Column Details

_

ColumnName

ColumnName

nvarchar(128)

NOT NULL

databasename

databasename

nvarchar(128)

NOT NULL

Referencing Columns

index_column_id

index_column_id

int

NOT NULL

index_name

index_name

nvarchar(450)

NULL

Referencing Columns

is_descending_key

is_descending_key

int

NOT NULL

is_index_primary_key

is_index_primary_key

bit

NOT NULL

is_index_unique

is_index_unique

bit

NOT NULL

Referencing Columns

RepoObject_guid

RepoObject_guid

uniqueidentifier

NOT NULL

Referencing Columns

RepoObjectColumn_guid

RepoObjectColumn_guid

uniqueidentifier

NOT NULL

TableName

TableName

nvarchar(128)

NOT NULL

Referencing Columns

tables_columns_type

tables_columns_type

nvarchar(500)

NULL

sql_modules_definition

ssas.IndexColumn_union - V script
CREATE View [ssas].[IndexColumn_union]
As
Select
    index_name           = Cast(index_name As NVarchar(450))
  , index_column_id
  , RepoObjectColumn_guid
  , is_descending_key
  , is_index_primary_key
  , is_index_unique
  , databasename
  --, TableID
  , ColumnName           = tables_columns_name
  , tables_columns_type
  , RepoObject_guid
  , TableName
From
    ssas.IndexColumn_from_IsKey
Union All
Select
    index_name           = Cast(index_name As NVarchar(450))
  , index_column_id
  , RepoObjectColumn_guid
  , is_descending_key
  , is_index_primary_key
  , is_index_unique
  , databasename
  --, TableID
  , ColumnName           = tables_columns_name
  , tables_columns_type
  , RepoObject_guid
  , TableName
From
    ssas.IndexColumn_from_IsUnique
--exlcude columns, already provided in [ssas].[IndexColumn_from_IsKey]
Where
    is_index_primary_key = 0
----it looks like these are artificial columns
----we don't want them in puml
--And type             <> 3
Union All
Select
    index_name           = Cast(index_name As NVarchar(450))
  , index_column_id
  , RepoObjectColumn_guid
  , is_descending_key
  , is_index_primary_key
  , is_index_unique
  , databasename
  --, TableID
  , ColumnName           = tables_columns_name
  , tables_columns_type
  , RepoObject_guid
  , TableName
From
    ssas.IndexColumn_from_Relationship
--exlcude columns, already provided in [ssas].[IndexColumn_from_IsKey] or [ssas].[IndexColumn_from_IsUnique]
Where
    is_index_primary_key = 0
    And is_index_unique  = 0