GIMContribModelPurgedTables
Cargo query to generate the list of "Other Reporting Data" tables for inclusion in the table of purged dimensional model tables on Info Mart Tables Purged by the Maintenance Job in the Ops Guide/Expert's Guide. The query looks for *_FACT tables with populated PDMColumn |KVP or |xpath parameters + known contribution-model tables that do not have these parameters -- namely, SDR_*_FACT tables and hard-coded CDR_FACT.
The template temporarily switches first on the page version so that the query for published pages uses the TestPDM* templates.
The query is:
{{#switch:{{#explode:{{FULLPAGENAME}}|:|4}}
|DRAFT={{#cargo_query:
tables=PDMTable,PDMColumn
|join on=PDMTable._pageName=PDMColumn._pageName
|fields=PDMTable.tableName
|where=( PDMTable._pageName LIKE "Documentation:GIM:Library:Table-%_FACT:{{#switch:{{lc:{{#sub:{{FULLPAGENAME}}|-5}}}}|draft=DRAFT|#default=PDMSource}}" AND ( (PDMColumn.xpath IS NOT NULL) OR (PDMColumn.KVP IS NOT NULL) ) ) OR PDMTable._pageName LIKE "Documentation:GIM:Library:Table-SDR_%_FACT:{{#switch:{{lc:{{#sub:{{FULLPAGENAME}}|-5}}}}|draft=DRAFT|#default=PDMSource}}" OR PDMTable._pageName LIKE "Documentation:GIM:Library:Table-CDR_FACT:{{#switch:{{lc:{{#sub:{{FULLPAGENAME}}|-5}}}}|draft=DRAFT|#default=PDMSource}}"
|group by=PDMTable.tableName
|limit=1000
|format=ul
}}
|Current
|#default={{#cargo_query:
tables=TestPDMTable,TestPDMColumn
|join on=TestPDMTable._pageName=TestPDMColumn._pageName
|fields=TestPDMTable.tableName
|where=( TestPDMTable._pageName LIKE "Documentation:GIM:Library:Table-%_FACT:PDMSource" AND ( (TestPDMColumn.xpath IS NOT NULL) OR (TestPDMColumn.KVP IS NOT NULL) ) ) OR TestPDMTable._pageName LIKE "Documentation:GIM:Library:Table-SDR_%_FACT:PDMSource" OR TestPDMTable._pageName LIKE "Documentation:GIM:Library:Table-CDR_FACT:PDMSource"
|group by=TestPDMTable.tableName
|limit=1000
|format=ul
}}
}}
No results
This page was last edited on November 12, 2020, at 19:42.
Comments or questions about this documentation? Contact us for support!