uv tool install sqlfluff
winget install sqlcmd
uv tool install --from "markitdown[all]" markitdown
uv tool install --from "sqlfluff" sqlfluff
az login
Run queries using sqlcmd:
sqlcmd `
--authentication-method ActiveDirectoryDefault `
-S sql-aisql.database.windows.net -d sqldb-aisql `
-Q "SELECT TOP 5 * FROM SalesLT.Product"run file as query:
sqlcmd `
--authentication-method ActiveDirectoryDefault `
-S sql-aisql.database.windows.net -d sqldb-aisql `
-i select.sqlScripts are in sql/gold and are ordered for first-time deployment.
Deploy all gold objects:
sqlcmd `
--authentication-method ActiveDirectoryDefault `
-S sql-aisql.database.windows.net -d sqldb-aisql `
-i sql/gold/00_deploy_gold.sqlRun load orchestration:
sqlcmd `
--authentication-method ActiveDirectoryDefault `
-S sql-aisql.database.windows.net -d sqldb-aisql `
-Q "EXEC gold.uspLoadGoldSalesLT @StartDate = '2000-01-01', @EndDate = '2035-12-31';"Individual scripts in execution order:
sql/gold/01_create_schema_gold.sqlsql/gold/10_create_dimensions.sqlsql/gold/20_create_facts.sqlsql/gold/30_create_dim_load_procs.sqlsql/gold/40_create_fact_load_procs.sqlsql/gold/50_create_orchestration_proc.sql
Create the raw table used to ingest flattened contact records from HubSpot contacts API responses:
sqlcmd `
--authentication-method ActiveDirectoryDefault `
-S sql-aisql.database.windows.net -d sqldb-aisql `
-i sql/raw/10_create_hubspot_contacts_raw.sql