Skip to content

Commit

Permalink
Schema som parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhoh committed Dec 20, 2023
1 parent fe67c70 commit 4903fc7
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions start_vscode_dbt.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Path to wher you would like to place the python virtual env
$dbtEnv_path = "C:\datavarehus\.dbtenv"
# Database schema
$schema = <schema>




#Function to set up a virtual env for dbt
function Add-dbtenv {
Expand All @@ -27,6 +28,16 @@ if ($args[0]) {
exit
}

#Database schema
if ($args[1]) {
# Database schema
$schema = $args[1].ToUpper()
Write-Host "Setting schema to: $schema"
} else {
Write-Host "Missing scheam. Pass schema as second argument this script."
exit
}


Try {
Write-Host "Checking if path $dbtPath exists ..."
Expand Down Expand Up @@ -96,4 +107,4 @@ Remove-Item -Path Env:https_proxy
$env:ORA_PYTHON_DRIVER_TYPE = "thin"
echo "ORA_PYTHON_DRIVER_TYPE: $env:ORA_PYTHON_DRIVER_TYPE"

code ../
code .

0 comments on commit 4903fc7

Please sign in to comment.