microsoft / microsoft/vscode-powerquery-sdk
Setting credentials fails when multiple data sources are used
@mattmasson is already working on this.
Since Oct 13, 2022.
- Dominant language
- TypeScript
- Stars
- 92
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Preflight Checklist
- I have installed the latest version of Power Query SDK.
- I have checked existing resources, including the common issues and the release notes.
- I have searched for similar issues.
Power Query SDK
0.1.7
Regression From
No response
Platform
Windows
Architecture
x64
OS Version
No response
VSCode version
No response
PQSdkTool Path
No response
Bug Description
When "Set credential" or pqTest set-credential is run for a file that uses multiple data sources, credential setting dies with an error along the lins of: Error: Expected 1 data source in expression, but 2 were found..
Steps to Reproduce
Connector:
section MyTester;
[DataSource.Kind="MyTester"]
shared MyTester.Do = () => "hi";
[DataSource.Kind="MyTester2"]
shared MyTester2.Do = (code) => "hi";
MyTester = [Authentication = [Implicit = []]];
MyTester2 = [Authentication = [Implicit = []]];
Test query:
{ MyTester.Do(), MyTester2.Do("abc") }
Actual Experience
PQTest.exe set-credential `
>> --extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez"`
>> --queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq"`
>> --prettyPrint -ak Anonymous
Error: Expected 1 data source in expression, but 2 were found.
Expected Experience
Should be allowed to set credentials.
In order for this to work, need a way to specify from the command line which data source I'm setting credentials for, then would need to run set-credentials twice, once per source.
Additional Context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.