The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have the below $Body variable to use within my API Invoke command, how can I exit the single quotes to reference my $server and $database variables? I currently receive the error: "DMTS_UnsupportedConnectionStringError". I've tried to add single quotes to exit but this triggers an unexpected token:
Solved! Go to Solution.
The issue was my server variable required "\\" not "\". Code that worked for me:
The issue was my server variable required "\\" not "\". Code that worked for me:
$Body = @"
{
"datasourceType":"SQL",
"connectionDetails":'{"server":$server,"database":$database}',
"datasourceName":$gatewaySourceName
}
"@@
note that the last line should be "@ . Can't get rid of the second @
Thanks! I actually have further details in my $Body so would the below be the correct syntax? I'm getting a "BadRequest" on my Invoke:
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
1 |
User | Count |
---|---|
11 | |
7 | |
5 | |
5 | |
4 |