ssas.model_json_32_relationships - V

type: V ( view ), modify_date: 2021-09-01 06:25:34

RepoObject_guid: F95FD8EE-E90A-EC11-8516-A81E8446D5B0

Description

Examples

Entity Diagram

entity-ssas.model_json_32_relationships

Columns

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

1

nvarchar(128)

NOT NULL

2

nvarchar(500)

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

bit

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

Foreign Key Diagram

entity_1_1_fk-ssas.model_json_32_relationships

References

Referenced Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-ssas.model_json_32_relationships

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-ssas.model_json_32_relationships

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-ssas.model_json_32_relationships

Column Reference Diagram

entity_1_1_colref-ssas.model_json_32_relationships

Indexes

PK_model_json_32_relationships

idx_model_json_32_relationships__2

Column Details

_

databasename

1

databasename

nvarchar(128)

NOT NULL

Referenced Columns

relationships_name

2

relationships_name

nvarchar(500)

NULL

relationships_crossFilteringBehavior

relationships_crossFilteringBehavior

nvarchar(500)

NULL

relationships_fromCardinality

relationships_fromCardinality

nvarchar(500)

NULL

relationships_fromColumn

relationships_fromColumn

nvarchar(500)

NULL

relationships_fromTable

relationships_fromTable

nvarchar(500)

NULL

relationships_isActive

relationships_isActive

bit

NULL

relationships_toCardinality

relationships_toCardinality

nvarchar(500)

NULL

relationships_toColumn

relationships_toColumn

nvarchar(500)

NULL

relationships_toTable

relationships_toTable

nvarchar(500)

NULL

sql_modules_definition

ssas.model_json_32_relationships - V script
/*
--check

Select
    Distinct
    j2.[Key]
  , j2.Type
From
    ssas.model_json_20                              As T1
    Cross Apply OpenJson ( T1.l2_relationships_ja ) As j1
    Cross Apply OpenJson ( j1.Value ) As j2
order by
    j2.[Key]
  , j2.Type
Go
*/
CREATE View ssas.model_json_32_relationships
As
Select
    T1.databasename
  , j2.relationships_name
  , j2.relationships_crossFilteringBehavior
  , j2.relationships_fromCardinality
  , j2.relationships_fromColumn
  , j2.relationships_fromTable
  , j2.relationships_isActive
  , j2.relationships_toCardinality
  , j2.relationships_toColumn
  , j2.relationships_toTable
From
    ssas.model_json_20                              As T1
    Cross Apply OpenJson ( T1.l2_relationships_ja ) As j1
    Cross Apply
    OpenJson ( j1.Value )
    With
    (
        relationships_name NVarchar ( 500 ) N'$.name'
      , relationships_crossFilteringBehavior NVarchar ( 500 ) N'$.crossFilteringBehavior'
      , relationships_fromCardinality NVarchar ( 500 ) N'$.fromCardinality'
      , relationships_fromColumn NVarchar ( 500 ) N'$.fromColumn'
      , relationships_fromTable NVarchar ( 500 ) N'$.fromTable'
      , relationships_isActive Bit N'$.isActive'
      , relationships_toCardinality NVarchar ( 500 ) N'$.toCardinality' --currently not in my models, but it could exists for 1:1 relationships?
      , relationships_toColumn NVarchar ( 500 ) N'$.toColumn'
      , relationships_toTable NVarchar ( 500 ) N'$.toTable'
    ) As j2