ssas.model_json_341_cultures_translations - V

type: V ( view ), modify_date: 2021-10-01 07:49:23

RepoObject_guid: FD5FD8EE-E90A-EC11-8516-A81E8446D5B0

Description

Examples

Entity Diagram

entity-ssas.model_json_341_cultures_translations

Columns

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

nvarchar(500)

NULL

nvarchar(max)

NULL

nvarchar(128)

NOT NULL

Foreign Key Diagram

entity_1_1_fk-ssas.model_json_341_cultures_translations

References

Referenced Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-ssas.model_json_341_cultures_translations

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-ssas.model_json_341_cultures_translations

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-ssas.model_json_341_cultures_translations

Column Reference Diagram

entity_1_1_colref-ssas.model_json_341_cultures_translations

Indexes

idx_model_json_341_cultures_translations__1

idx_model_json_341_cultures_translations__2

Column Details

_

cultures_name

cultures_name

nvarchar(500)

NULL

cultures_translations_model_j

cultures_translations_model_j

nvarchar(max)

NULL

databasename

databasename

nvarchar(128)

NOT NULL

sql_modules_definition

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

Select
    Distinct
    j2.[Key]
  , j2.Type
From
    ssas.model_json_34_cultures As T1
    Cross Apply OpenJson ( T1.cultures_translations_j )
                --As j1
                --Cross Apply OpenJson ( j1.Value )
                                As j2
order by
    j2.[Key]
  , j2.Type
Go

Select
    T1.*
  , j2.*
From
    ssas.model_json_34_cultures As T1
    Cross Apply OpenJson ( T1.cultures_translations_j )
                --As j1
                --Cross Apply OpenJson ( j1.Value )
                                As j2
Go

Select
    DISTINCT
    j2.*
From
    ssas.model_json_34_cultures As T1
    Cross Apply OpenJson ( T1.cultures_translations_j )
                --As j1
                --Cross Apply OpenJson ( j1.Value )
                                As j2
Where
    j2.[Key] = 'model'
GO
*/
CREATE View [ssas].[model_json_341_cultures_translations]
As
Select
    T1.databasename
  , T1.cultures_name
  , j2.cultures_translations_model_j
From
    ssas.model_json_34_cultures As T1
    Cross Apply
    OpenJson ( T1.cultures_translations_j )
    --As j1
    --Cross Apply
    --OpenJson ( j1.Value )
    With
    (
        cultures_translations_model_j NVarchar ( Max ) N'$.model' As Json
    )                             As j2