Skip to content

Conversation

@krisajenkins
Copy link

Problem

Users frequently paste the setup script into the Snowflake UI and click "Run" instead of "Run All". This causes only the final statement to execute, which was previously a static success message:

select 'Congratulations! Snowflake Data Engineering workshop setup has completed successfully!' as status;

This gave users a false sense of success even though none of the actual setup (warehouse, databases, tables, functions) had been created.

Solution

Replace the static message with a verification query that checks whether the setup actually completed:

  • Verifies current database is set to RAW_DB
  • Checks that the CUSTOMERS table exists and has data
  • Checks that the PRODUCTS table exists and has data
  • Checks that the ORDERS table exists and has data

The query now reports:

  • ✓ 4/4 checks passed. Setup successful! when everything is properly configured
  • ✗ X/4 checks passed. Setup incomplete - please click "Run All" to execute the entire script. when setup is incomplete

Test Plan

  • Paste script into Snowflake UI and click "Run" (not "Run All") - should show failure message with reminder
  • Click "Run All" on the full script - should show success message with 4/4 checks passed

Users frequently paste the setup script and click 'Run' instead of 'Run All',
which only executes the final statement. The old static success message gave
no indication that the setup was incomplete.

The new final query checks that:
- Current database is set to RAW_DB
- CUSTOMERS table exists and has data
- PRODUCTS table exists and has data
- ORDERS table exists and has data

If all checks pass, it reports '✓ 4/4 checks passed. Setup successful!'
Otherwise, it shows how many checks failed and reminds the user to click
'Run All' to execute the entire script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant