ssas.model_json_341112_cultures_translations_model_tables_hierarchies - V

type: V ( view ), modify_date: 2021-10-01 15:19:24

RepoObject_guid: 0F09DA81-C322-EC11-8524-A81E8446D5B0

Description

Examples

Entity Diagram

entity-ssas.model_json_341112_cultures_translations_model_tables_hierarchies

Columns

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

nvarchar(10)

NOT NULL

nvarchar(500)

NOT NULL

nvarchar(max)

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(128)

NOT NULL

Foreign Key Diagram

entity_1_1_fk-ssas.model_json_341112_cultures_translations_model_tables_hierarchies

References

Object Reference Diagram - 1 1

entity_1_1_objectref-ssas.model_json_341112_cultures_translations_model_tables_hierarchies

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-ssas.model_json_341112_cultures_translations_model_tables_hierarchies

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-ssas.model_json_341112_cultures_translations_model_tables_hierarchies

Column Reference Diagram

entity_1_1_colref-ssas.model_json_341112_cultures_translations_model_tables_hierarchies

Indexes

idx_model_json_341112_cultures_translations_model_tables_hierarchies__1

idx_model_json_341112_cultures_translations_model_tables_hierarchies__2

idx_model_json_341112_cultures_translations_model_tables_hierarchies__3

Column Details

_

cultures_translations_model_tables_hierarchies_levels_ja

cultures_translations_model_tables_hierarchies_levels_ja

nvarchar(max)

NULL

cultures_translations_model_tables_hierarchies_name

cultures_translations_model_tables_hierarchies_name

nvarchar(128)

NULL

cultures_translations_model_tables_hierarchies_translatedCaption

cultures_translations_model_tables_hierarchies_translatedCaption

nvarchar(128)

NULL

sql_modules_definition

ssas.model_json_341112_cultures_translations_model_tables_hierarchies - V script
/*
--get and check existing values

Select
    Distinct
    j2.[Key]
  , j2.Type
From
    ssas.model_json_34111_cultures_translations_model_tables                      As T1
    Cross Apply OpenJson ( T1.cultures_translations_model_tables_hierarchies_ja ) As j1
    Cross Apply OpenJson ( j1.Value ) As j2
Order by
    j2.[Key]
  , j2.Type
Go

Select
    T1.*
  , j2.*
From
    ssas.model_json_34111_cultures_translations_model_tables                      As T1
    Cross Apply OpenJson ( T1.cultures_translations_model_tables_hierarchies_ja ) As j1
    Cross Apply OpenJson ( j1.Value ) As j2
Go

Select
    j2.*
From
    ssas.model_json_34111_cultures_translations_model_tables                      As T1
    Cross Apply OpenJson ( T1.cultures_translations_model_tables_hierarchies_ja ) As j1
    Cross Apply OpenJson ( j1.Value ) As j2
Where
    j2.[Key] = 'columns'

Select
    j2.*
From
    ssas.model_json_34111_cultures_translations_model_tables                      As T1
    Cross Apply OpenJson ( T1.cultures_translations_model_tables_hierarchies_ja ) As j1
    Cross Apply OpenJson ( j1.Value ) As j2
Where
    j2.[Key] = 'measures'
Go

*/
create View ssas.model_json_341112_cultures_translations_model_tables_hierarchies
As
Select
    T1.databasename
  , T1.cultures_name
  , T1.cultures_translations_model_name
  , T1.cultures_translations_model_tables_name
  , j2.cultures_translations_model_tables_hierarchies_name
  , j2.cultures_translations_model_tables_hierarchies_translatedCaption
  , j2.cultures_translations_model_tables_hierarchies_levels_ja
From
    ssas.model_json_34111_cultures_translations_model_tables                      As T1
    Cross Apply OpenJson ( T1.cultures_translations_model_tables_hierarchies_ja ) As j1
    Cross Apply
    OpenJson ( j1.Value )
    With
    (
        cultures_translations_model_tables_hierarchies_name NVarchar ( 128 ) N'$.name'
      , cultures_translations_model_tables_hierarchies_translatedCaption NVarchar ( 128 ) N'$.translatedCaption'
      , cultures_translations_model_tables_hierarchies_levels_ja NVarchar ( Max ) N'$.levels' As Json --array
    ) As j2