ssas.model_json_34111_cultures_translations_model_tables - V

type: V ( view ), modify_date: 2021-10-01 15:17:22

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

Description

Examples

Entity Diagram

entity-ssas.model_json_34111_cultures_translations_model_tables

Columns

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

nvarchar(10)

NOT NULL

nvarchar(500)

NOT NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(128)

NOT NULL

Foreign Key Diagram

entity_1_1_fk-ssas.model_json_34111_cultures_translations_model_tables

References

Object Reference Diagram - 1 1

entity_1_1_objectref-ssas.model_json_34111_cultures_translations_model_tables

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-ssas.model_json_34111_cultures_translations_model_tables

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-ssas.model_json_34111_cultures_translations_model_tables

Column Reference Diagram

entity_1_1_colref-ssas.model_json_34111_cultures_translations_model_tables

Indexes

idx_model_json_34111_cultures_translations_model_tables__1

idx_model_json_34111_cultures_translations_model_tables__2

idx_model_json_34111_cultures_translations_model_tables__3

Column Details

_

cultures_translations_model_tables_columns_ja

cultures_translations_model_tables_columns_ja

nvarchar(max)

NULL

cultures_translations_model_tables_hierarchies_ja

cultures_translations_model_tables_hierarchies_ja

nvarchar(max)

NULL

cultures_translations_model_tables_measures_ja

cultures_translations_model_tables_measures_ja

nvarchar(max)

NULL

cultures_translations_model_tables_translatedCaption

cultures_translations_model_tables_translatedCaption

nvarchar(128)

NULL

sql_modules_definition

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

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

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

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

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

*/
CREATE View [ssas].[model_json_34111_cultures_translations_model_tables]
As
Select
    T1.databasename
  , T1.cultures_name
  , T1.cultures_translations_model_name
  , j2.cultures_translations_model_tables_name
  , j2.cultures_translations_model_tables_translatedCaption
  , j2.cultures_translations_model_tables_columns_ja
  , j2.cultures_translations_model_tables_hierarchies_ja
  , j2.cultures_translations_model_tables_measures_ja
From
    ssas.model_json_3411_cultures_translations_model_T                As T1
    Cross Apply OpenJson ( T1.cultures_translations_model_tables_ja ) As j1
    Cross Apply
    OpenJson ( j1.Value )
    With
    (
        cultures_translations_model_tables_name NVarchar ( 128 ) N'$.name'
      , cultures_translations_model_tables_translatedCaption NVarchar ( 128 ) N'$.translatedCaption'
      , cultures_translations_model_tables_columns_ja NVarchar ( Max ) N'$.columns' As Json         --array
      , cultures_translations_model_tables_hierarchies_ja NVarchar ( Max ) N'$.hierarchies' As Json --array
      , cultures_translations_model_tables_measures_ja NVarchar ( Max ) N'$.measures' As Json --arrey
    ) As j2