property.RepoObjectProperty_Collect_source_ROGross - V

type: V ( view ), modify_date: 2021-12-16 11:41:19

RepoObject_guid: B6FE9885-EA9D-EB11-84F6-A81E8446D5B0

Description

Examples

Entity Diagram

entity-property.repoobjectproperty_collect_source_rogross

Columns

Table 1. Columns of property.RepoObjectProperty_Collect_source_ROGross - V
PK Column Name Data Type NULL? ID

1

uniqueidentifier

NOT NULL

2

varchar(39)

NOT NULL

nvarchar(max)

NULL

Foreign Key Diagram

entity_1_1_fk-property.repoobjectproperty_collect_source_rogross

References

Object Reference Diagram - 1 1

entity_1_1_objectref-property.repoobjectproperty_collect_source_rogross

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-property.repoobjectproperty_collect_source_rogross

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-property.repoobjectproperty_collect_source_rogross

Column Reference Diagram

entity_1_1_colref-property.repoobjectproperty_collect_source_rogross

Indexes

PK_RepoObjectProperty_Collect_source_ROGross

idx_RepoObjectProperty_Collect_source_ROGross__2

Column Details

_

RepoObject_guid

1

RepoObject_guid

uniqueidentifier

NOT NULL

property_name

2

property_name

varchar(39)

NOT NULL

property_value

property_value

nvarchar(max)

NULL

sql_modules_definition

property.RepoObjectProperty_Collect_source_ROGross - V script
CREATE View property.RepoObjectProperty_Collect_source_ROGross
As
Select
    ro.RepoObject_guid
  , property_name  = p_names.property_name
  , property_value =
  --
  Case p_names.property_name
      When 'pk_index_guid'
          Then
          Cast(ro.pk_index_guid As NVarchar(Max))
      When 'pk_IndexPatternColumnDatatype'
          Then
          Cast(ro.pk_IndexPatternColumnDatatype As NVarchar(Max))
      When 'pk_IndexPatternColumnName'
          Then
          Cast(ro.pk_IndexPatternColumnName As NVarchar(Max))
      When 'pk_IndexSemanticGroup'
          Then
          Cast(ro.pk_IndexSemanticGroup As NVarchar(Max))
      When 'is_repo_managed'
          Then
          Cast(IsNull ( ro.is_repo_managed, 0 ) As NVarchar(Max))
      When 'is_ssas'
          Then
          Cast(IsNull ( ro.is_ssas, 0 ) As NVarchar(Max))
      When 'Description'
          Then
          Cast(ro.Description As NVarchar(Max))
      When 'uspgenerator_usp_id'
          Then
          Cast(ro.uspgenerator_usp_id As NVarchar(Max))
      When 'usp_persistence_RepoObject_guid'
          Then
          Cast(ro.usp_persistence_RepoObject_guid As NVarchar(Max))
      When 'persistence_source_RepoObject_guid'
          Then
          Cast(ro.persistence_source_RepoObject_guid As NVarchar(Max))
      When 'persistence_source_RepoObject_fullname'
          Then
          Cast(ro.persistence_source_RepoObject_fullname As NVarchar(Max))
      When 'persistence_source_RepoObject_fullname2'
          Then
          Cast(ro.persistence_source_RepoObject_fullname2 As NVarchar(Max))
      When 'persistence_source_RepoObject_xref'
          Then
          Cast(ro.persistence_source_RepoObject_xref As NVarchar(Max))
      When 'has_history'
          Then
          Cast(ro.has_history As NVarchar(Max))
      When 'has_history_columns'
          Then
          Cast(ro.has_history_columns As NVarchar(Max))
      When 'is_persistence'
          Then
          Cast(ro.is_persistence As NVarchar(Max))
      When 'is_persistence_check_duplicate_per_pk'
          Then
          Cast(ro.is_persistence_check_duplicate_per_pk As NVarchar(Max))
      When 'is_persistence_check_for_empty_source'
          Then
          Cast(ro.is_persistence_check_for_empty_source As NVarchar(Max))
      When 'is_persistence_delete_missing'
          Then
          Cast(ro.is_persistence_delete_missing As NVarchar(Max))
      When 'is_persistence_delete_changed'
          Then
          Cast(ro.is_persistence_delete_changed As NVarchar(Max))
      When 'is_persistence_insert'
          Then
          Cast(ro.is_persistence_insert As NVarchar(Max))
      When 'is_persistence_truncate'
          Then
          Cast(ro.is_persistence_truncate As NVarchar(Max))
      When 'is_persistence_update_changed'
          Then
          Cast(ro.is_persistence_update_changed As NVarchar(Max))
      When 'history_schema_name'
          Then
          Cast(ro.history_schema_name As NVarchar(Max))
      When 'history_table_name'
          Then
          Cast(ro.history_table_name As NVarchar(Max))
      When 'Inheritance_StringAggSeparatorSql'
          Then
          Cast(ro.Inheritance_StringAggSeparatorSql As NVarchar(Max))
      When 'InheritanceDefinition'
          Then
          Cast(ro.InheritanceDefinition As NVarchar(Max))
      When 'InheritanceType'
          Then
          Cast(ro.InheritanceType As NVarchar(Max))
      When 'AntoraReferencedList'
          Then
          Cast(ros2.AntoraReferencedList As NVarchar(Max))
      When 'AntoraReferencingList'
          Then
          Cast(ros2.AntoraReferencingList As NVarchar(Max))
      --When 'AntoraExternalReferencedList'
      --    Then
      --    Cast(ro.AntoraExternalReferencedList As NVarchar(Max))
      --When 'AntoraExternalReferencingList'
      --    Then
      --    Cast(ro.AntoraExternalReferencingList As NVarchar(Max))
      When 'has_execution_plan_issue'
          Then
          Cast(ro.has_execution_plan_issue As NVarchar(Max))
      When 'has_get_referenced_issue'
          Then
          Cast(ro.has_get_referenced_issue As NVarchar(Max))
  End
From
    repo.RepoObject_gross      As ro
    Left Join
        repo.RepoObject_sat2_T As ros2
            On
            ros2.RepoObject_guid = ro.RepoObject_guid

    --ensure all these property_name are included in the resulting view per RepoObject
    Cross Join
    (
        Values
            ( 'pk_index_guid' )
          , ( 'pk_IndexPatternColumnDatatype' )
          , ( 'pk_IndexPatternColumnName' )
          , ( 'pk_IndexSemanticGroup' )
          , ( 'is_repo_managed' )
          , ( 'is_ssas' )
          , ( 'Description' )
          , ( 'uspgenerator_usp_id' )
          , ( 'usp_persistence_RepoObject_guid' )
          , ( 'persistence_source_RepoObject_guid' )
          , ( 'persistence_source_RepoObject_fullname' )
          , ( 'persistence_source_RepoObject_fullname2' )
          , ( 'persistence_source_RepoObject_xref' )
          , ( 'has_history' )
          , ( 'has_history_columns' )
          , ( 'is_persistence' )
          , ( 'is_persistence_check_duplicate_per_pk' )
          , ( 'is_persistence_check_for_empty_source' )
          , ( 'is_persistence_delete_missing' )
          , ( 'is_persistence_delete_changed' )
          , ( 'is_persistence_insert' )
          , ( 'is_persistence_truncate' )
          , ( 'is_persistence_update_changed' )
          , ( 'history_schema_name' )
          , ( 'history_table_name' )
          , ( 'Inheritance_StringAggSeparatorSql' )
          , ( 'InheritanceDefinition' )
          , ( 'InheritanceType' )
          , ( 'AntoraReferencedList' )
          , ( 'AntoraReferencingList' )
          --, ( 'AntoraExternalReferencedList' )
          --, ( 'AntoraExternalReferencingList' )
          , ( 'has_execution_plan_issue' )
          , ( 'has_get_referenced_issue' )
    )                          As p_names ( property_name )
Where
    Not ro.RepoObject_guid Is Null