ssas.model_json_312_tables_measures - V
type: V ( view ), modify_date: 2021-09-01 08:42:42
RepoObject_guid: F35FD8EE-E90A-EC11-8516-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
1 |
|
|
||
2 |
|
|
||
3 |
|
|
||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
Indexes
PK_model_json_312_tables_measures
-
IndexSemanticGroup: ssas_table_measure
-
databasename; nvarchar(128)
-
[column-tables_name]; nvarchar(128)
-
[column-tables_measures_name]; nvarchar(500)
-
-
PK, Unique, Real: 1, 1, 0
idx_model_json_312_tables_measures__2
-
IndexSemanticGroup: no_group
-
databasename; nvarchar(128)
-
[column-tables_name]; nvarchar(128)
-
-
PK, Unique, Real: 0, 0, 0
idx_model_json_312_tables_measures__3
-
IndexSemanticGroup: no_group
-
databasename; nvarchar(128)
-
-
PK, Unique, Real: 0, 0, 0
Column Details
_
tables_measures_description_ja
tables_measures_description_ja |
|
|
Referencing Columns
sql_modules_definition
ssas.model_json_312_tables_measures - V script
/*
--get and check existing values
Select
Distinct
j2.[Key]
, j2.Type
From
ssas.model_json_31_tables As T1
Cross Apply OpenJson ( T1.tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
order by
j2.[Key]
, j2.Type
Go
Select
T1.*
, j2.*
From
ssas.model_json_31_tables As T1
Cross Apply OpenJson ( T1.tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
Go
Select
j2.*
From
ssas.model_json_31_tables As T1
Cross Apply OpenJson ( T1.tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
Where
j2.[Key] = 'description'
Select
j2.*
From
ssas.model_json_31_tables As T1
Cross Apply OpenJson ( T1.tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
Where
j2.[Key] = 'expression'
Go
*/
CREATE View ssas.model_json_312_tables_measures
As
Select
T1.databasename
, T1.tables_name
, T1.RepoObject_guid
, j2.tables_measures_name
, j2.tables_measures_description
, j2.tables_measures_description_ja
, j2.tables_measures_displayFolder
, j2.tables_measures_expression
, j2.tables_measures_expression_ja
, j2.tables_measures_formatString
, j2.tables_measures_isHidden
From
ssas.model_json_31_tables_T As T1
Cross Apply OpenJson ( T1.tables_measures_ja ) As j1
Cross Apply
OpenJson ( j1.Value )
With
(
tables_measures_name NVarchar ( 500 ) N'$.name'
, tables_measures_description NVarchar ( Max ) N'$.description'
, tables_measures_description_ja NVarchar ( Max ) N'$.description' As Json --multiple lines?
, tables_measures_displayFolder NVarchar ( 500 ) N'$.displayFolder'
, tables_measures_expression NVarchar ( Max ) N'$.expression'
, tables_measures_expression_ja NVarchar ( Max ) N'$.expression' As Json --multiple lines?
, tables_measures_formatString NVarchar ( 500 ) N'$.formatString'
, tables_measures_isHidden Bit N'$.isHidden'
) As j2