This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-DB2Query | |
{ | |
<# | |
.SYNOPSIS | |
This function runs a query against a DB2 database. | |
.DESCRIPTION | |
This function runs a query against a DB2 database using the account of the user executing the command. | |
.PARAMETER Server |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dbName="SAMPLE" | |
$server="not.my.localhost" | |
#Define connection string for the database | |
$cn = new-object system.data.OleDb.OleDbConnection("server=$($server);Provider=IBMDADB2;DSN=$($dbName);trusted_connection=true;"); | |
#Define data set for first query | |
$ds = new-object "System.Data.DataSet" "ds" | |
#Define query to run | |
$q = "select * from hello_world" | |
# Define data object given the specific query and connection string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Describe "Invoke-DaxQuery" { | |
Context "Invoke a DAX Query and test the result"{ | |
# Run queries and compare them | |
$results = Invoke-DaxQuery -DAXQuery "EVALUATE ReportCatalogQuery" | |
# Test if the config was retrieved | |
It "Should verify the count is correct by comparing against a static number" { | |
@($results).Count | Should -Be 36 | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-RsDeploymentConfig -RsProjectFile 'C:\Repos\GitHub\ReportingServicesTools\Tests\CatalogItems\testResources\TestProjects\SQLServerPerformanceDashboardReportingSolution\SQL Server Performance Dashboard\SQL Server Performance Dashboard.rptproj' -ConfigurationToUse Release | |
FullPath : Release | |
OverwriteDatasets : False | |
OverwriteDataSources : False | |
TargetReportFolder : SQL Server Performance Dashboard | |
TargetDatasetFolder : /Datasets | |
TargetDatasourceFolder : /Data Sources | |
TargetReportPartFolder : Report Parts | |
TargetServerURL : http://localhost/reportserver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-ExecuteNotebook -InputNotebook .\SQL-on-Docker-with-PowerShell.ipynb -Parameters @{sa_password = 'Test9999'; SQLNumber = 97} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-ExecuteNotebook -InputNotebook .\DockerDesktop-with-SQL-PowerShell-90.ipynb -Parameters @{sa_password = 'Test9999'} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irm https://gist.githubusercontent.com/SQLvariant/5cbad3dd52093fbd053ec46769a0fc22/raw/1ecf6c292a6c0b9419af01d7360d373a2adff3cd/Using_ConvertTo-SQLNoteBook.ipynb -OutFile Using_ConvertTo-SQLNoteBook.ipynb |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.