DacFx
DacFx copied to clipboard
sqlpackage option to exclude specific tables from export
https://github.com/MicrosoftDocs/sql-docs/issues/8511
is there a way to exclude certain tables? the /p: TableData=(STRING[]) option can include tables. is there an inverse to only exclude certain tables? this is possible in SSMS advanced settings when using the export data tier application wizard. looking for a way to script it, cross-platform, using sqlpackage
is sqlpackage open source? maybe i can contribute a solution
I second this one - I'd also be happy to help out if this is open source. I would additionally love it if there was a way to ignore the data in a table, but include the table definition
In the meantime I wrote a Powershell script that achieves the same thing; https://gist.github.com/jhelmink/b579ae0e1494b9b4ef497311c8a11754
It just queries your database for all the base tables, excluding any you don't want, and creates a set of /p: TableName=xxx that are appended to the SqlPackage /Action:Extract command.
This gets you the full schema of all tables, but only the data that you want.
Would be really interested in this feature too!