-
Hi, I have been thinking to create a view using TS_METADATA_OBJECT, TS_METADATA_COLUMN and TS_DEPENDENT_OBJECT. However, by using a distinct I was hoping to create a 1-1 relationship, as each Worksheet has a fixed set of columns and I just need to find the way from an answer to the worksheet (going through the COLUMN_GUID).
this I joined to TS_METADATA_OBJECT through DEPENDENT_GUID to see the worksheet below. however I seem to miss something, as the results do not tie out. Is there anything I missed? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hey @eckhami
So this is definitely possible -- but it does come with some caveats. As you said, the relationships exist between The TS_BI_SERVER table contains a column called Now, for the caveats. 😄
If I wanted to show the relationships between this information (Worksheet -> Dependents) , this is the kind of query I would write. SELECT
"ta_1"."OBJECT_TYPE" "ca_1",
"ta_1"."NAME" "ca_2",
"ta_2"."COLUMN_NAME" "ca_3",
"ta_2"."IS_FORMULA" "ca_4",
count(DISTINCT "ta_3"."NAME") "ca_5"
FROM "SNOWFLAKE_DB"."CS_TOOLS_V150"."TS_DEPENDENT_OBJECT" "ta_3"
RIGHT OUTER JOIN "SNOWFLAKE_DB"."CS_TOOLS_V150"."TS_METADATA_COLUMN" "ta_2"
ON (
"ta_3"."COLUMN_GUID" = "ta_2"."COLUMN_GUID"
AND "ta_3"."CLUSTER_GUID" = "ta_2"."CLUSTER_GUID"
)
RIGHT OUTER JOIN "SNOWFLAKE_DB"."CS_TOOLS_V150"."TS_METADATA_OBJECT" "ta_1"
ON (
"ta_2"."CLUSTER_GUID" = "ta_1"."CLUSTER_GUID"
AND "ta_2"."OBJECT_GUID" = "ta_1"."OBJECT_GUID"
)
WHERE LOWER("ta_1"."NAME") = '(sample) retail - apparel'
GROUP BY
"ca_1",
"ca_2",
"ca_3",
"ca_4" |
Beta Was this translation helpful? Give feedback.
-
Thanks for all the information! I will still go through your code and see, if this helps me out. Thanks |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hi,
with some help from the Thoughtspot team I found a possible solution to my question:
I need to be able to filter 'CS Tools ~ BI Server Advanced' to see results based on a specific subset of Worksheets.
First step was to see the relation of "Parent Worksheet" to Liveboards and answers associated with it. this was done through worksheet "CS Tools ~ Worksheet Column Utilisation"
From here I could extract the underlying SQL, which I then transferred into this code and saved as a view in ThoughtSpot: