Forum Discussion
jnickell
Helper V
6 years agoUsing a variable for statement in PowerQuery Beta for SSIS
I'm trying to use the PowerQuery Beta for some SSIS packages. I was curious if any one had used this, in particular the ability to set a PowerQuery equivalent to a variable. I've "gotten" it to wor...
rdeheld
2 years agoFrequent Visitor
Hi Thanks for this I am struggeling with the same. I am trying to use a Bearer Token as a parameter for a web source. How should I implement the @[User::Bearer] variable in this query?
Source = Json.Document(Web.Contents("https://api.sam360.com/api/Report/GetRecords?reportId=HardwareAllComputersGeneralDetails&organisationId=0", [Headers=[Authorization= @[User::Bearer] , "Content-Type"="application/json; charset=utf-8"]])),
- jnickell2 years ago
Helper V
Based on my recent experience I think you'd wind up with something similar to:
The SSIS variable declaration is going to need to be broken into two different strings and concatenated with your user variable.The existing double quotes in Power Query, need to be escaped with a \.
" Source = Json.Document(Web.Contents(\"https://api.sam360.com/api/Report/GetRecords?reportId=HardwareAllComputersGeneralDetails&organisatio...\", [Headers=[Authorization="+@[User::Bearer]+" , \"Content-Type\"=\"application/json; charset=utf-8\"]])), .... "