Sql-server – SQL SSDT Database Projects: Source Control Lookup Data

source controlsql serversql-server-2016ssdt

Does SQL Server SSDT Visual Studio 2017 Database Projects support Source control data for lookup tables, or do we still have to utilize messy Post-Deployment Merge Scripts for multiple tables?

Redgate has a more finesse, solution. Wondering when MS will catch up.

Related

Best Answer

There is no specific built-in support for lookup data in SSDT at this time. As you noted in the "related" links in your question, the currently accepted practice is to script out lookup data in post deploy scripts using MERGE statements. This can become unpleasant as the size of lookup data grows.

Microsoft actually mentions "reference data" as a primary example of the use of post deployment scripts. See How to: Specify Predeployment or Postdeployment Scripts:

These scripts can be used for many purposes. For example:
...

  • You can insert reference data that must exist in a table in a post-deployment script

You could potentially go outside of SSDT and introduce SSIS packages with flat file sources. This might be a better experience depending on the preferences and expertise of those on your team.