Professional Documents
Culture Documents
:green Do {
#looking for a specific indicator (extract completed)
$TabResult = Get-TableauExtract -connectionString $connectionString -query
$query | Select-Object -ea 0 -ExpandProperty completed_at
if ( $TabResult -notlike $null) {
$extractNotes = Get-TableauExtract -connectionString $connectionString
-query $query | Select-Object -ea 0 -ExpandProperty notes
Send-MailMessage -To "????" -From "????" -Subject "Your $extractName is
complete with code of $extractCode" -Body "Extract Notes: $extractNotes"
-SmtpServer "????"
$keepgoing = $false
break green
} else {
$curTime = (Get-Date).DateTime
Write-Warning "Extract still refreshing as of: $curTime" 3>>
TabExtractDataLoading.txt
$keepgoing = $true
}
Start-Sleep -Seconds 1800 #check every 30 minutes if it's not done.
}While ( $keepgoing )