Compare svw release

Step 1: Download SQL Files from Azure Storage

  1. Access Azure Storage Explorer:
    • Open Azure Storage Explorer.
  2. Navigate to Gold SQL Container:
    • Locate the gold sql container in Azure Storage account.
  3. Download Files from Dev and Prd Containers:
    • Download all SQL svw files from the dev container.
    • Download all SQL svw files from the prd container.
  4. Save Files Locally:
    • Create a new folder with today’s date (e.g., 20240731).
    • Inside this folder, create two sub folders: svw_dev for dev queries and svw_prd for prd queries.
    • Save the downloaded dev SQL files into the svw_dev folder.
    • Save the downloaded prd SQL files into the svw_prd folder.

Step 2: Flatten Directory Structure and Compare Files Using Python Notebook

  1. Open Python Jupyter Notebook:
    • Launch Python Jupyter Notebook “Compare devops svw queries.ipynb”.
  2. Run the first three cells in the Notebook to Flattening Directories:
    • Run first cell to generate today’s date.
    • Execute the next two cells in the notebook to flatten the file directories.
    • This process will consolidate all files into a single directory for each environment (dev and prd).
  3. Execute the 4th cell.
    • This compares each file line by line between the svw_dev and svw_prd directories.
    • This will output a list of files that have differences between the dev and prd environments.

Step 3: Analyse Differences Using Visual Studio Code

  1. Open Visual Studio Code:
    • Launch Visual Studio Code.
  2. Open the Folder with Today’s Date:
    • In Visual Studio Code, open the folder created earlier with today’s date (e.g., 20240731).
  3. Compare Files:
    • Review the list of files with differences obtained from the Jupyter Notebook.
    • Open each file in Visual Studio Code and use its comparison features to identify and analyze the specific differences between the dev and prd versions.

Leave a Comment