Forum Discussion
Clone and Re-bind with on-prem SQL Server
- 8 years ago
heit0050 wrote:
Thanks for the reply, Eric! Thanks also for the super helpful sample code on getting the password encryption done to setup the gateway. I'm pretty sure I never would have figured that out on my own.
I had kind of resigned myself to just having our staff create the new pbix file each time. At least the rest of the procress can be autotmated. It just seems like they are so close to letting us 100% automate the system. I'm more just not looking forward to the hundreds of existing clients that'll need to be setup for the first time.
But with the new pbit files it is actually pretty quick. Maybe someday they'll let us go from pbit -> pbix via command line somehow. I did create an "idea" for this if it is something else that others are interested in:
Thanks again for all your help!
You only have to create the pbix file in DirectQuery for the very first time. If the customers have the same dataset and report, the pbix file can be reused. You can import the pbix file and update connection string once a new customer is on board. So maybe 100% automation can be done.
Thanks for the reply, Eric! Thanks also for the super helpful sample code on getting the password encryption done to setup the gateway. I'm pretty sure I never would have figured that out on my own.
I had kind of resigned myself to just having our staff create the new pbix file each time. At least the rest of the procress can be autotmated. It just seems like they are so close to letting us 100% automate the system. I'm more just not looking forward to the hundreds of existing clients that'll need to be setup for the first time.
But with the new pbit files it is actually pretty quick. Maybe someday they'll let us go from pbit -> pbix via command line somehow. I did create an "idea" for this if it is something else that others are interested in:
Thanks again for all your help!
heit0050 wrote:
Thanks for the reply, Eric! Thanks also for the super helpful sample code on getting the password encryption done to setup the gateway. I'm pretty sure I never would have figured that out on my own.
I had kind of resigned myself to just having our staff create the new pbix file each time. At least the rest of the procress can be autotmated. It just seems like they are so close to letting us 100% automate the system. I'm more just not looking forward to the hundreds of existing clients that'll need to be setup for the first time.
But with the new pbit files it is actually pretty quick. Maybe someday they'll let us go from pbit -> pbix via command line somehow. I did create an "idea" for this if it is something else that others are interested in:
Thanks again for all your help!
You only have to create the pbix file in DirectQuery for the very first time. If the customers have the same dataset and report, the pbix file can be reused. You can import the pbix file and update connection string once a new customer is on board. So maybe 100% automation can be done.
- heit00508 years agoAdvocate I
That did the trick! Thanks again for all your help.
For anyone else, here are the rough steps using the C# PowerBI V2 Rest wrapper API:
1) Authenticate (AcquireTokenAsync)2) Get your gateway (GetGatewaysAsync)
3) Create a datasource under your gateway (CreateDatasourceAsync)
4) Upload your report that is using DirectQuery to your onPrem SQL Server (PostImportWithFileAsyncInGroup)
5) Update the connection string on that new report (SetAllDatasetConnectionsInGroupAsync)