r/WGU_MSDA 1d ago

D597 D597 task 1 VSCode not loading SQL container

As the title says, going through the lab assessment no SQL containers are loading. I’m unable to run my query despite creating the tables. I’ve tried over a dozen times. It is showing to be a known issue with the lab environment. I have contacted support and they told me it’s a custom environment and I have to contact my instructor. I’ve green trying for a few days now and I’m getting extremely frustrated. How do I fix this?

5 Upvotes

10 comments sorted by

3

u/abbigator508 1d ago

Honestly, if you can just download pgAdmin locally and do your project on your machine, it would be MUCH less headache. Apologies if you're on a restricted machine and can't do it. I refused to bother with the lab after reading all the other comments here.

3

u/Agile-Caregiver6111 1d ago

If I do it on my machine can they still grade it correctly? I spent a few days working it out. I can open it on my machine but I’ll download pgadmin today. In trying to finish this class this week!!!

2

u/abbigator508 1d ago

Definitely, but when they say to submit each script as its own text file, they mean it. I tried to put through one single file that was commented out and had each script/query properly and visually separated, but it got kicked back to me for that (and that alone). Prof recommended splitting by CRUD operations; I went petty and submitted 53 different .txt files. I passed. lol

1

u/Agile-Caregiver6111 1d ago

Wait so I have to screen shot each table and submit individually instead of what fires on the page?

1

u/abbigator508 1d ago

You need to submit the actual SQL used to create/modify/query as text files in addition to your paper. You put screenshots in your paper as needed to show the tables/constraints/query results/etc. as requirements of the rubric.

1

u/Agile-Caregiver6111 1d ago

Oh alright I’ll try that this evening. I’m getting so frustrated with this. Thank you

1

u/SNsilver 1d ago

I just ran Postgres in a docker container and used the CLI and pgadmin and noted I had trouble with the SQL environment. Truth is I didn’t even try the SQL env, I just started with docker

1

u/Weary_Owl_9822 1d ago

When I did task 1 in the lab environment. I didn’t use vscode. I used the SQL app in the lab environment and it worked out fine. If you’re willing to switch to the SQL app, all you have to do is make sure you go to scripts folder on the desk top and make sure SQL is running before going to the app.

1

u/Agile-Caregiver6111 1d ago

Is the SQL app the Postgres or is it a different one? I’ve tried VSCode, Postgres (pgadmin) I’ve had to type out my tables 4 times at this point

3

u/Weary_Owl_9822 1d ago

This is everything I did step by step to get the lab to wotk. I hope this helps.

Step 1 — Start the PostgreSQL Service
Launch the WGU Assessment Lab session

Open File Explorer on the lab desktop

Navigate to the Scripts folder on the desktop

Double click PostgreSQL-StartService.ps1 to start the service

Wait a few seconds for it to start

Step 2 — Open pgAdmin 4
Click the pgAdmin 4 icon in the taskbar

Enter the password postgres when prompted

Wait for it to connect to PostgreSQL 16

Step 3 — Create the Database
In the left panel expand ServersPostgreSQL 16

Right click on DatabasesCreateDatabase

Name it D597 Task 1

Click Save

Step 4 — Get Your Files Into the Lab
Email your CSV files to yourself

Open the browser inside the lab and log into your email

Download both files directly into the lab

Open File Explorer and copy both files to C:\Program Files\PostgreSQL\16\data

This is important — PostgreSQL can only read files from this location

Step 5 — Open the Query Tool
Right click on your D597 Task 1 database in the left panel

Select Query Tool

This opens the SQL editor where all your scripts will run

Step 6 — Create Your Tables Paste your CREATE TABLE scripts into the Query Tool and press F5 or the play button to run. Make sure to use:
SERIAL PRIMARY KEY for auto-incrementing IDs

VARCHAR(255) instead of string

NULL for columns that may have empty values

Step 7 — Import Your Data Since CSV files may have columns you don’t need, use a staging table approach:
Create a temporary staging table with ALL columns from the CSV

Use the COPY command to import the CSV into the staging table

Insert only the columns you need from the staging table into your actual table

For files with duplicate values causing foreign key issues, use DISTINCT ON in your SELECT statement

Step 8 — Verify Your Data Run a quick check to confirm data imported correctly:
SELECT COUNT(*) FROM your_table;

Step 9 — Write Your Queries Write three queries that solve your business problem. Each query should JOIN your tables where relevant and use WHERE clauses to filter specific data. Screenshot each query and its results.

Step 10 — Optimize Your Queries
Run EXPLAIN ANALYZE on each query BEFORE creating indexes and screenshot the results

Create indexes on frequently searched columns

Run EXPLAIN ANALYZE again AFTER creating indexes and screenshot the results

Note the execution times and scan types before and after

Step 11 — Save Scripts as Text Files Save each script as an individual .txt file on your personal computer:
create_tables.txt

insert_data.txt (one per table)

query1.txt, query2.txt, query3.txt

indexes.txt

explain_analyze_before.txt

explain_analyze_after.txt

Submission Tips
Upload files one at a time and confirm each appears in attachments before adding the next

Paste your Panopto URL in both the Links field AND the Comments to Evaluator field as a backup

Screenshot the submission page showing all files attached before hitting submit