[teiid-issues] [JBoss JIRA] (TEIID-5257) Sysadmin Usage table doesn't track column-level usage by a virtual procedure
Steven Hawkins (JIRA)
issues at jboss.org
Fri Jun 29 13:02:00 EDT 2018
[ https://issues.jboss.org/browse/TEIID-5257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-5257.
-----------------------------------
Resolution: Done
Updated the logic to look at procedure result set columns by scanning all of the returnable statements. It also will look for storedprocedure invocations, not just query expressions.
> Sysadmin Usage table doesn't track column-level usage by a virtual procedure
> ----------------------------------------------------------------------------
>
> Key: TEIID-5257
> URL: https://issues.jboss.org/browse/TEIID-5257
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Affects Versions: 8.12.11.6_4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> There are not column-level dependencies in relation 'Virtual procedure column -> View/table column'.
> For this vdb:
> {code:xml|title=vdb}
> <model name="insideVirtualModel" type="VIRTUAL">
> <metadata type="DDL">
> <![CDATA[
> CREATE VIEW v1 (v1col string) AS SELECT 'a' UNION ALL SELECT 'b';
> CREATE VIEW v2 (v2col string) AS SELECT v1col||'b' FROM v1;
> CREATE VIRTUAL PROCEDURE p1() RETURNS (p1col string) AS
> BEGIN
> SELECT v2col FROM v2;
> END
> CREATE VIEW v7 (v7col string) AS SELECT p1.p1col FROM (CALL p1())AS p1;
> ]]>
> </metadata>
> </model>
> <model name="dependentOnPhysicalModel" type="VIRTUAL">
> <metadata type="DDL">
> <![CDATA[
> CREATE VIEW v3 (v3col string) AS SELECT t1col||'b' FROM t1;
> CREATE VIEW v4 (v4col string) AS SELECT p.p2col FROM (CALL p2(1)) AS p;
> ]]>
> </metadata>
> </model>
> {code}
> Following query:
> {code:sql|title=SYSADMIN.Usage query}
> SELECT * FROM SYSADMIN.Usage WHERE VDBName='vdbname' AND SchemaName='insideVirtualModel' AND Name='p1' AND object_type='Column' AND Uses_object_type='Column'
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the teiid-issues
mailing list