I have a Subset project file and would like to obtain a list of the table classifications. How can I extract this information from my template?
Step-by-step guide
-
Start Windows Powershell (use "Windows" key +"R" → powershell)
Then type this command: -
([xml](Get-Content -Path <SubSetProjectFile>)).project.states.state.pattern |select schema,table,classification
schema table classification ------ ----- -------------- dbo DWH_CUSTOMERS_HIS Start dbo DWH_SUPPLIER_CONTACTS_HIS Unused dbo DWH_ORDERS_HIS Subset dbo DWH_PRODUCTS_HIS Unused dbo DWH_SUPPLIER_PRODUCT_HIS Unused dbo DWH_SERIALS_HIS Unused dbo DWH_CONTRACTS_HIS Unused dbo DWH_LOCATIONS_HIS Subset dbo DWH_TASKS_HIS Unused dbo DWH_CONTRACT_DETAILS_HIS Unused dbo DWH_SUPPLIERS_HIS Unused
-
And if you like a gridview add | Out-gridview → ([xml](Get-Content Path <SubSetProjectFile>)).project.states.state.pattern |select schema, table, classification | out-gridview
You can add or or remove columns from your output. Available fields on this Path are:
-
classification
-
connection
-
name
-
table
-
schema