reference.RepoObject_referenced_level - V
type: V ( view ), modify_date: 2021-08-17 19:16:58
RepoObject_guid: 27E90A1E-7495-EB11-84F4-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
|
|
sql_modules_definition
reference.RepoObject_referenced_level - V script
/*
Select
Object1.RepoObject_guid As StartingNode_guid
, Object1.RepoObject_fullname As StartingNode_fullname
, Object1.RepoObject_fullname2 As StartingNode_fullname2
, Count ( Object2.RepoObject_fullname ) WITHIN Group(GRAPH Path) As referenced_level
, Last_Value ( Object2.[RepoObject_guid] ) Within Group(GRAPH Path) As LastNode_guid
, Last_Value ( Object2.[RepoObject_fullname] ) Within Group(GRAPH Path) As LastNode_fullname
, Last_Value ( Object2.[RepoObject_fullname2] ) Within Group(GRAPH Path) As LastNode_fullname2
, String_Agg ( Object2.[RepoObject_fullname], '->' ) Within Group(GRAPH Path) As ListNode
From
[graph].[RepoObject] As Object1
, [graph].[ReferencedObject] For Path As referenced
, [graph].[RepoObject] For Path As Object2
Where Match(
SHORTEST_PATH(Object1(-(referenced)->Object2)+));
*/
CREATE View reference.RepoObject_referenced_level
As
Select
a = 1