Forum Discussion
Migration from Collections to Embedded Confusion
- Anonymous8 years ago
Hi structure40,
thanks for taking the time to view the gist. These were some typo mistakes while I was moving the code from production to the gist and doing the appropriate transformations. I fixed the gist so you can try again.
Fixes performed:
- (PostUpdateDatasourcesConnectionAsync)The reportDatasetKey changed to reportDatasetId
- (SetReportParameters)destinationWorkspaceId changed to tenantWorkspaceId
- (PostUpdateDatasourcesConnectionAsync) SendAsync has been changed to accept HttpContent
Hope it helps.
Thanos
PS: Please accept this reply as solution if this solved your problem. We should help other people to know that there is an answer for this issue.
Hi structure40,
do you wanna read my blog post about templating in a multi-tenant environment. In there I also explain (and also provide a gist) some things about credentials (updata datasources and credentials).
Hope it helps.
Thanos
- structure408 years agoRegular Visitor
Thanks Thanos. I am taking a look at your sample code and there appears to be a couple errors that I am struggling with understanding what is missing.
The first is CloneReportAsync where we are calling PostUpdateDatasourcesConnectionAsync. It is looking for reportDatasetKey which is an unknown variable. Any idea what they should be set as?
There is also an issue in PostUpdateDatasourcesConnectionAsync on the call to SendAsync using the object created from StringContent but the method is expecting a Stream.
The last one is in SetReportParameters. It is using destinationWorkspaceId which is an undefined variable.
Thanks for the help. It looks like this should work if I can get past this issues.
- Anonymous8 years agoNot applicable
Hi structure40,
thanks for taking the time to view the gist. These were some typo mistakes while I was moving the code from production to the gist and doing the appropriate transformations. I fixed the gist so you can try again.
Fixes performed:
- (PostUpdateDatasourcesConnectionAsync)The reportDatasetKey changed to reportDatasetId
- (SetReportParameters)destinationWorkspaceId changed to tenantWorkspaceId
- (PostUpdateDatasourcesConnectionAsync) SendAsync has been changed to accept HttpContent
Hope it helps.
Thanos
PS: Please accept this reply as solution if this solved your problem. We should help other people to know that there is an answer for this issue.
- structure408 years agoRegular Visitor
Thanks for the update. I ended up in the same place as you did with your proposed changes. I also had to enable a firewall rule on the database I was trying to access to get this to work. Thanks again for the help.