Migrate SAS ETL output to MSSQL

Data model

data model

Overview

The Serves data is extracted and transformed in an external SAS ETL pipeline that results in a CSV file such as “SE_FINAL_20190630.csv”. This file is conformed to the data model and then loaded into a MS SQL database using PowerShell scripts.

PowerShell Script

The Powershell script automates the creation of the MS SQL database, its tables, and data load. The script can be downloaded from this repository. The source file (i.e. SE_FINAL_20190630.csv) and the script should be placed in the same directory on the MSSQL server. The scripts should be run in the following order through a PowerShell ISE:

  1. table_load.ps1 [option 2]
  2. table_load.ps1 [option 3]
  3. lookup_load.ps1
  4. table_load.ps1 [option 1]