Files
org_web/blogs/2025/11-november/30-11-week-review.org
Zaine Arch a18debbf21
All checks were successful
Build Org Website / build (push) Successful in 49s
auth
2026-05-09 00:26:04 +01:00

4.9 KiB

[30-11-2025] - Weekly Review

Previous Week List:

  • Competencies to do:

    • Aware of relational databases
    • Aware of TLS and SSL
    • Aware of good error handling and logging
    • Understanding of TCP/IP
    • Understands Server Operating Systems (might be tough)

    Been extremely busy with this sprint, getting the work delivered in a timely manner; there wasn't as much time to focus on competencies.

Weekly Review

  • <2025-11-24 Mon>:

    • Got the news the company is reducing staff. See this article
    • Got the DAG for PR's to work
  • <2025-11-25 Tue>

    • Worked mainly on threads and commits DAGs
  • <2025-11-26 Wed>

    • We had a meeting with Kevin on the scoring system for the redundancy thing
    • Finished creating and testing all the DAG's
  • <2025-11-27 Thu>

    • Refinement meeting
    • Started creating base case tests for SQL
    • Made a script to automate the creation of testing files
  • <2025-11-28 Fri>

    • Finished base case tests
    • Training with Lloyd on SRE and Techops

Daily retrospectives:

../../../assets/images/reviews/30-11-25-daily-retros.jpg

Weekly retrospectives

../../../assets/sketchnotes/30-11-2025-retrospectives.svg

Other

Powershell script:

Here is the powershell script that generates the files for testing:

# Define the base folders
$securityFolder = "C:\Users\zqayyum\Source\Repos\DataMart.Academy.DoraMetrics\tsqlt\Security"
$scriptsFolder = "C:\Users\zqayyum\Source\Repos\DataMart.Academy.DoraMetrics\tsqlt"


# Create base folders if they don't exist
if (!(Test-Path $securityFolder)) { New-Item -ItemType Directory -Path $securityFolder }
if (!(Test-Path $scriptsFolder)) { New-Item -ItemType Directory -Path $scriptsFolder }

# Define main file names (schemas)
$fileNames = @(
 "testMergeStagingDataCommits.sql",
 "testMergeStagingDataEnvironments.sql",
 "testMergeStagingDataPullRequests.sql",
 "testMergeStagingDataReleases.sql",
 "testMergeStagingDataRepositories.sql",
 "testMergeStagingDataThreads.sql"
)

# Define stored procedure test files
$storedProcFiles = @(
 "Test changed rows are logged.sql",
 "Test changed rows are not logged as inserted.sql",
 "Test changed rows are updated.sql",
 "Test errors are logged.sql",
 "Test import date on changed rows is updated.sql",
 "Test new rows are inserted.sql",
 "Test new rows are not logged as updated.sql"
)

foreach ($name in $fileNames) {
 # Create .sql file under Security
 $filePath = Join-Path $securityFolder $name
 $schemaName = [System.IO.Path]::GetFileNameWithoutExtension($name)

 # Content for schema file
 $schemaContent = @"
CREATE SCHEMA [$schemaName]
 AUTHORIZATION [dbo];

GO
EXECUTE sp_addextendedproperty 
 @name = N'tSQLt.TestClass', 
 @value = 1, 
 @level0type = N'SCHEMA', 
 @level0name = N'$schemaName';
GO
"@

 Set-Content -Path $filePath -Value $schemaContent

 # Create schema folder under Scripts
 $schemaFolderPath = Join-Path $scriptsFolder $schemaName
 if (!(Test-Path $schemaFolderPath)) {
 New-Item -ItemType Directory -Path $schemaFolderPath | Out-Null
 }

 # Create Stored Procedures subfolder
 $storedProcFolderPath = Join-Path $schemaFolderPath "Stored Procedures"
 if (!(Test-Path $storedProcFolderPath)) {
 New-Item -ItemType Directory -Path $storedProcFolderPath | Out-Null
 }

 # Create stored procedure files with dynamic content
 foreach ($procFile in $storedProcFiles) {
 $procFilePath = Join-Path $storedProcFolderPath $procFile
 $procName = [System.IO.Path]::GetFileNameWithoutExtension($procFile)

 $procContent = @"
CREATE PROCEDURE $schemaName.[$procName]
AS
BEGIN
 SET NOCOUNT ON;

 -- Assemble
 DECLARE @RowsUpdated INT; 

 EXEC tsqlt.FakeTable @SchemaName = 'staging', @TableName = 'tbl_TemplateTable';
 EXEC tsqlt.FakeTable @SchemaName = 'data', @TableName = 'tbl_TemplateTable';
 EXEC tsqlt.FakeTable @SchemaName = 'logging', @TableName = 'tbl_ExecutionCounts';

 INSERT INTO data.tbl_TemplateTable(UnitDescription, TrunionDisplacementInMM)
 VALUES('UT7000', '9');

 INSERT INTO staging.tbl_TemplateTable(UnitDescription, TrunionDisplacementInMM)
 VALUES('UT7000', '6');

 -- Act
 EXEC staging.pr_MergeStagingData;

 -- Assert
 SELECT @RowsUpdated = RowsUpdated FROM logging.tbl_ExecutionCounts;
 
 EXEC tsqlt.AssertEquals 
 @Actual = @RowsUpdated,
 @Expected = 1; 
END
"@

 Set-Content -Path $procFilePath -Value $procContent
 }
}

Write-Host "All files and folders created successfully with dynamic procedure content"

Finances

I decided to spin up a docker container to manage finances. For the moment there is no way to connect to a Bank without using an intermediary (privacy concerns).

../../../assets/images/reviews/30-11-2025-acutal.png

Next Week

  • Understands Server Operating Systems (might be tough)
  • Understanding of TCP/IP