This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I'm using PowerBI Rest API to update the datasource. (https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/updatedatasourcesingroup)
Data sources included in this dataset: SqlServer{"server":"bXXXXXX01v\\secondary","database":"XXXXX_DB"}
My JSON:
{
"updateDetails": [
{
"datasourceSelector": {
"datasourceType": "SQL",
"connectionDetails": {
"server": "bXXXXXXX01v\\secondary",
"database": "XXXXX_DB"
}
},
"connectionDetails": {
"server": "bXXXXXXX02v",
"database": "XXXXX_DB"
}
}
]
}
I'm getting this error:
{
"error": {
"code": "InvalidRequest",
"message": "Operation is not supported for selector #8"
}
}
If I change "bXXXXXX01v\\secondary" to "bXXXXXX01v\secondary" I get this:
{
"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
{
"message": "Bad JSON escape sequence: \\s. Path 'updateDetails[0].datasourceSelector.connectionDetails.server', line 7, position 35.",
"target": "updateDatasourcesRequest.updateDetails[0].datasourceSelector.connectionDetails.server"
},
{
"message": "'updateDatasourcesRequest' is a required parameter",
"target": "updateDatasourcesRequest"
}
]
}
}
If the original datasource is just "server": "bXXXXXX01v", it works fine.
What might be the problem here?
Can I use special characters in the server option?
Hi all,
After several weeks, microsoft support found the problem.
The PBI report was developed in v1.
To solve this:
- install latest version of PBI Desktop
- Open PBI Report
- Save As with another name
- Publish new file
After this, the error is gone.
Hi @zbroinx ,
Please show the code corresponding to this error (masking sensitive information).
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is the code I'm using in the API website:
{
"updateDetails": [
{
"datasourceSelector": {
"datasourceType": "SQL",
"connectionDetails": {
"server": "bXXXXXXX01v\\secondary",
"database": "XXXXX_DB"
}
},
"connectionDetails": {
"server": "bXXXXXXX02v",
"database": "XXXXX_DB"
}
}
]
}
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |