Query Plan and Data Lineage
You are looking at an older version of the documentation. The latest version is found here.
SYSADMIN.getDataLineage
This procedure returns a data lineage plan for the specified SQL query in XML format.
SYSADMIN.getDataLineage(IN "sql" string NOT NULL) RETURNS (dataLineage xml NOT NULL)
It has the following parameters:
Parameter | Description |
---|---|
sql | String representing the SQL query to build the plan for |
dataLineage | Data lineage plan in XML format |
SYSADMIN.getDataLineageWithRelationsOnly
This procedure returns the data lineage for a given query.
SYSADMIN.getDataLineageWithRelationsOnly(IN "sql" string NOT NULL, IN "level" integer, OUT targetSchema string NOT NULL, OUT targetTableName string NOT NULL, OUT targetColumnName string NOT NULL, OUT sourceSchema string, OUT sourceTableName string, OUT sourceColumnName string)
It has the following parameters:
Parameter | Description |
---|---|
sql | String representing the SQL query to find relations |
dataLineage | Maximum depth until which the lineage is returned. If set to |
Example of usage:
SELECT * FROM SYSADMIN.getDataLineageWithRelationsOnly('SELECT id FROM views.view_test_datalineage') a;
SYSLOG.getQueryLogPlan
This procedure returns a query plan for the specified entry in the SYSLOG.QueryLogs
system table in XML format.
SYSLOG.getQueryLogPlan(IN logId biginteger NOT NULL, OUT queryPlan string RESULT)
It takes the following parameters:
Parameter | Description |
---|---|
logId | ID of the entry in the SYSLOG.QueryLogs system table |
queryPlan | Query plan in XML format |
SYSLOG.getQueryLogDataLineage
This procedure returns a data lineage plan for the specified entry in the SYSLOG.QueryLogs
system table in XML format.
SYSLOG.getQueryLogDataLineage(IN logId biginteger NOT NULL, OUT dataLineage string RESULT)
It takes the following parameters:
Parameter | Description |
---|---|
logId | ID of the entry in the SYSLOG.QueryLogs system table |
dataLineage | Data lineage plan in XML format |