Code Monkey home page Code Monkey logo

vscode-powerquery-sdk's Introduction

Power Query Connector SDK for Visual Studio Code

NOTE: The Power Query SDK extension for Visual Studio Code is currently in Public Preview. You can learn more about this extension and the development of Power Query data connectors from the link aka.ms/PowerQuerySDKDocs.

Provides functionality related to the development and testing of Custom Connectors for Power Query and Power BI.

Install the latest version of the Power Query SDK through the Visual Studio Code Marketplace.

Animated demonstration GIF of the Power Query SDK for Visual Studio Code

NOTE: You can learn how to manually build and install this project from the article on build and install.

Features

What you can do with this extension:

  • Create a new extension project using a custom connector template
  • Build connector file (.mez)
  • Set and manage credentials
  • Run test queries
  • Test your TestConnection function for refresh on the cloud
  • View query results
  • Leverage syntax highlighting and intellisense for writing M script
  • Manage your workspace settings and other project-level configurations

Related projects

vscode-powerquery

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Support and issues

Before creating a new issue or discussion, please make sure to the read our support article for guidelines.

vscode-powerquery-sdk's People

Contributors

albertli-msft avatar bgribaudo avatar csigs avatar dependabot[bot] avatar mattmasson avatar microsoft-github-operations[bot] avatar microsoftopensource avatar ptyx507x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-powerquery-sdk's Issues

AAD access token not refreshed when using AAD authentication kind

Can we get a fix for the "AAD authentication kind"? The token doesn't refresh correctly after it expires in about an hour.

Whenever our custom connector is running on the desktop then everything works. But when it is running on an enterprise gateway, our PQ dies after an hour. I think you would be able to encourage the development of more connectors by first fixing a basic issue like this in your AAD-based tokens. This issue is VERY painful - because it can happen when you least expect, for reasons like slow data sources, or increasing amounts of source data.

This seems like an easy thing to fix given that the PBI desktop's mashup engine is working properly. There isn't any conceptual reason why the engine in the enterprise gateway should NOT be able to refresh an AAD access token just as the desktop does.

Lots of people are stumbling on this. Your premium customers expect PQ to run for up to five hours before failures. Absolutely no customers expect this type of a basic token problem when the Power BI mashup engine is authenticating against the AAD .

Here is more information about AAD authentication and related refresh failures:

Refresh failures.

Output split between "Output" and "Terminal" panes

Preflight Checklist

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 VSCode builds an extension then evaluates the current file, the command line statements run + results produced are spliit between VSCode's "Output" and "Terminal" panes.

Steps to Reproduce

Edit extension file so that the SDK rebuilds it, then run "Evaluate current file."

Actual Experience

VSCode "Terminal" pane:

Executing task: c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.7-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.110.3\tools\MakePQX.exe compile 

{
  "TargetMezRootPath": "C:\\Users\\ben\\Desktop\\TestConnector\\BenTest\\bin\\AnyCPU\\Debug\\BenTest.mez",
  "RelativePathsOfContent": [... {output truncated for brevity}
 *  Terminal will be reused by tasks, press any key to close it. 

VSCode "Output" pane:

[5:28:40 PM]	[Info]	[Task found] c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.7-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.110.3\tools\PQTest.exe run-test
				--extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez"
				--queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq"
				--prettyPrint
[5:28:42 PM]	[Info]	RunTestBattery result [
    {
        "ActivityId": "5594a7b4-6688-4e53-9682-18fbf197ca5a",
{output truncated for brevity} 

Expected Experience

Both sets of output to appear in the same pane (i.e. either both in "Terminal" or both in "Output"). That way, the user can see all commands that were used in one place.

Additional Context

No response

Command Statements - Output Relative Path

The command statements displayed in the Output window contain absolute paths when they reference files from the connector project.

c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.3\.nuget\Microsoft.PowerQuery.SdkTools.2.109.6\tools\pqtest.exe run-test 
--extension c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez 
--queryFile c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq 
--prettyPrint

pqtest.exe works fine with relative paths (relative to the current working directory).

To make Output’s contents less verbose, one idea would be to render out paths in arguments relative to that working directory.

For example, the above would become:

c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.3\.nuget\Microsoft.PowerQuery.SdkTools.2.109.6\tools\pqtest.exe run-test 
--extension bin\AnyCPU\Debug\BenTest.mez 
--queryFile BenTest.query.pq 
--prettyPrint

Just an idea, for what it’s worth.

Option to turn off raw row dump in output window

VSCode's Output window contains a JSON (or JSON-like) serialization of all rows produced by the evaluated query. If that query returns a lot of rows, the output window contains a very large quantity of JSON.

Is there an option to reduce the verbosity of what is output so that rows aren't rendered here (instead are just displayed in the PQTest result pane)?

Might be nice so that Output is easier to scroll through.

Example Output

[5:34:29 PM]	[Info]	RunTestBattery result [
    {
        "ActivityId": "36489f42-6381-4393-991e-ca6a311c3fa1",
        "DataSourceAnalysis": [
            {
                "Kind": "DataSource",
                "FunctionName": "BenTest.Contents",
                "DataSource": {
                    "kind": "BenTest",
                    "path": "BenTest"
                },
                "DataSourceReference": {
                    "protocol": "x-datasource",
                    "address": {
                        "kind": "BenTest",
                        "path": "BenTest"
                    },
                    "authentication": null,
                    "query": null
                },
                "ModuleName": null,
                "ModuleVersion": null
            }
        ],
        "Details": "// Use this file to write queries to test your data connector\r\nlet\r\n    result = BenTest.Contents()\r\nin\r\n    result\r\n",
        "EndTime": "2022-09-22T21:34:28.9025178+00:00",
        "Method": "PQTest.RunTest",
        "Name": "BenTest.query.pq",
        "StartTime": "2022-09-22T21:34:27.7307854+00:00",
        "Output": [
            {
                "A": 1
            },
            {
                "A": 2
            },
            {
                "A": 3
            },
            {
                "A": 4
            },
            {
                "A": 5
            },
            {
                "A": 6
            },
            {
                "A": 7
            },
            {
                "A": 8
            },
            {
                "A": 9
            },
            {
                "A": 10
            },
            {
                "A": 11
            },
            {
                "A": 12
            },
            {
                "A": 13
            },
            {
                "A": 14
            },
            {
                "A": 15
            },
            {
                "A": 16
            },
            {
                "A": 17
            },
            {
                "A": 18
            },
            {
                "A": 19
            },
            {
                "A": 20
            },
            {
                "A": 21
            },
            {
                "A": 22
            },
            {
                "A": 23
            },
            {
                "A": 24
            },
            {
                "A": 25
            },
            {
                "A": 26
            },
            {
                "A": 27
            },
            {
                "A": 28
            },
            {
                "A": 29
            },
            {
                "A": 30
            },
            {
                "A": 31
            },
            {
                "A": 32
            },
            {
                "A": 33
            },
            {
                "A": 34
            },
            {
                "A": 35
            },
            {
                "A": 36
            },
            {
                "A": 37
            },
            {
                "A": 38
            },
            {
                "A": 39
            },
            {
                "A": 40
            },
            {
                "A": 41
            },
            {
                "A": 42
            },
            {
                "A": 43
            },
            {
                "A": 44
            },
            {
                "A": 45
            },
            {
                "A": 46
            },
            {
                "A": 47
            },
            {
                "A": 48
            },
            {
                "A": 49
            },
            {
                "A": 50
            },
            {
                "A": 51
            },
            {
                "A": 52
            },
            {
                "A": 53
            },
            {
                "A": 54
            },
            {
                "A": 55
            },
            {
                "A": 56
            },
            {
                "A": 57
            },
            {
                "A": 58
            },
            {
                "A": 59
            },
            {
                "A": 60
            },
            {
                "A": 61
            },
            {
                "A": 62
            },
            {
                "A": 63
            },
            {
                "A": 64
            },
            {
                "A": 65
            },
            {
                "A": 66
            },
            {
                "A": 67
            },
            {
                "A": 68
            },
            {
                "A": 69
            },
            {
                "A": 70
            },
            {
                "A": 71
            },
            {
                "A": 72
            },
            {
                "A": 73
            },
            {
                "A": 74
            },
            {
                "A": 75
            },
            {
                "A": 76
            },
            {
                "A": 77
            },
            {
                "A": 78
            },
            {
                "A": 79
            },
            {
                "A": 80
            },
            {
                "A": 81
            },
            {
                "A": 82
            },
            {
                "A": 83
            },
            {
                "A": 84
            },
            {
                "A": 85
            },
            {
                "A": 86
            },
            {
                "A": 87
            },
            {
                "A": 88
            },
            {
                "A": 89
            },
            {
                "A": 90
            },
            {
                "A": 91
            },
            {
                "A": 92
            },
            {
                "A": 93
            },
            {
                "A": 94
            },
            {
                "A": 95
            },
            {
                "A": 96
            },
            {
                "A": 97
            },
            {
                "A": 98
            },
            {
                "A": 99
            },
            {
                "A": 100
            },

<< truncated to make this issue description shorter >>

        ],
        "RowCount": 1000,
        "Status": "Passed",
        "TraceFileLocation": null,
        "Type": "PQTest.Expression"
    }
]

Make it clear that the SDK only supports Windows platform

Hello, I have installed VSIX on my MacBook. The workspace was settled correctly, but then it dropped into an endless loop with Display extension info, and if I canceled it and tried to run anything else like "Set credentials," it went into a loop also.

image

I have tried the same on a Windows machine, and it works.

pqtest set-credentials ignores -ak when JSON template used

Preflight Checklist

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 setting credentials using a JSON template, if pqtest set-credential is passed argument -ak, it is ignored.

Steps to Reproduce

  1. Save the following credentials template to a text file:
{
  "AuthenticationKind": "Key",
  "AuthenticationProperties": {
    "Key": "some key"
  },
  "PrivacySetting": "None",
  "Permissions": []
}
  1. Execute the following command using PowerShell:
get-content ~\Desktop\Template.txt | c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.7-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.110.3\tools\PQTest.exe set-credential `
>> --extension "c:\Users\...SomeConnector.mez" `
>> --queryFile "c:\Users\...SomeConnector.query.pq" `
>> --prettyPrint -ak Anonymous

Notice that the command line specifies an authentication kind of "Anonymous" while the template specifies "Key".

Actual Experience

Command runs successfully.

Expected Experience

Expect an error because the authentication kind in the template does not match the kind specified on the command line.

Idea: Error any time -ak is specified when a template is used ("-ak/--authenticationKind cannot be specified as an argument when credentials are set using JSON").

Additional Context

No response

Feature Suggestion - Offer a Firewall-Enabled Mode

My understanding is that the new SDK operates without Power Query's data protection firewall running.

From Power Query's perspective, everything inside a connector (well, technically, inside a data source kind, I believe) is considered a single data source for data protection partitioning purposes. So, within a data source kind, the fact that the firewall isn't present with the SDK is a moot point.

However, the SDK allows M code outside of the connector/outside of a data source kind to run, specifically the code in the MyConnector.query.pq test file. The code in this test file can pull from multiple data source kinds that are defined in the project's connector, as well as from other connectors that ship with Power Query.

In order for behavior to match between the SDK and other Power Query environments (e.g. PQ in Power BI or Excel), it would be nice to have the option in the SDK to have the firewall enabled and operating normally so that code inside the .query.pq test file is properly partitioned and firewalled.

Thank you for your consideration!

Missing VSIX file

Hello everyone,
I was about to test this SDK, but the VSIX file is missing or hidden. Is it on purpose?

Thank you for your answer.
Štěpán

PSTest: -v & -of Command Line Arguments Ignored

Preflight Checklist

Power Query SDK

0.1.5

Regression From

No response

Platform

Windows

Architecture

x64

OS Version

Windows 10 Pro

VSCode version

No response

PQSdkTool Path

No response

Bug Description

PQTest seems to ignore command line arguments -v and -of.

Steps to Reproduce

Pass PSTest the arguments indicated in the "Actual Experience" section.

Actual Experience

Output format/style/details are identical regardless of option specified.
(Note: This holds true of argument syntax is changed from -opt value to -opt=value.)

-v ignored:

-v quiet

PS> c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.5\.nuget\Microsoft.PowerQuery.SdkTools.2.110.2\tools\PQTest.exe run-test 
--extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez" 
--queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq" 
-v quiet

[{"ActivityId":"9a63b416-d1c1-4625-b323-102752417d0a","DataSourceAnalysis":[{"Kind":"DataSource","FunctionName":"BenTest.Configuration","DataSource":{"kind":"BenTest","path":"BenTest"},"DataSourceReference":{"protocol":"x-datasource","address":{"kind":"BenTest","path":"BenTest"},"authentication":null,"query":null},"ModuleName":null,"ModuleVersion":null}],"Details":"let\r\n    Result = BenTest.Configuration()\r\nin\r\n    Result","EndTime":"2022-09-28T13:35:36.5747031+00:00","Method":"PQTest.RunTest","Name":"BenTest.query.pq","StartTime":"2022-09-28T13:35:35.4607274+00:00","Output":[],"RowCount":0,"Status":"Passed","TraceFileLocation":null,"Type":"PQTest.Expression"}]

-v detailed

PS> c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.5\.nuget\Microsoft.PowerQuery.SdkTools.2.110.2\tools\PQTest.exe run-test 
--extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez" 
--queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq" 
-v detailed

[{"ActivityId":"e8672124-cede-4417-abb4-3495c181c47c","DataSourceAnalysis":[{"Kind":"DataSource","FunctionName":"BenTest.Configuration","DataSource":{"kind":"BenTest","path":"BenTest"},"DataSourceReference":{"protocol":"x-datasource","address":{"kind":"BenTest","path":"BenTest"},"authentication":null,"query":null},"ModuleName":null,"ModuleVersion":null}],"Details":"let\r\n    Result = BenTest.Configuration()\r\nin\r\n    Result","EndTime":"2022-09-28T13:35:43.3867876+00:00","Method":"PQTest.RunTest","Name":"BenTest.query.pq","StartTime":"2022-09-28T13:35:42.2707326+00:00","Output":[],"RowCount":0,"Status":"Passed","TraceFileLocation":null,"Type":"PQTest.Expression"}]

-of Ignored

-of XUnit

PS> c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.5\.nuget\Microsoft.PowerQuery.SdkTools.2.110.2\tools\PQTest.exe run-test --extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez" 
--queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq" 
-of XUnit

[{"ActivityId":"3eec45a8-5024-4500-ab1d-7f6d4a922ff4","DataSourceAnalysis":[{"Kind":"DataSource","FunctionName":"BenTest.Configuration","DataSource":{"kind":"BenTest","path":"BenTest"},"DataSourceReference":{"protocol":"x-datasource","address":{"kind":"BenTest","path":"BenTest"},"authentication":null,"query":null},"ModuleName":null,"ModuleVersion":null}],"Details":"let\r\n    Result = BenTest.Configuration()\r\nin\r\n    Result","EndTime":"2022-09-28T13:36:05.9674521+00:00","Method":"PQTest.RunTest","Name":"BenTest.query.pq","StartTime":"2022-09-28T13:36:04.8577669+00:00","Output":[],"RowCount":0,"Status":"Passed","TraceFileLocation":null,"Type":"PQTest.Expression"}]

-of ADO

PS> c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.5\.nuget\Microsoft.PowerQuery.SdkTools.2.110.2\tools\PQTest.exe run-test 
--extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez" 
--queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq" 
-of ADO

[{"ActivityId":"d4dc07b8-cca2-4ae4-95fe-1c00283679a0","DataSourceAnalysis":[{"Kind":"DataSource","FunctionName":"BenTest.Configuration","DataSource":{"kind":"BenTest","path":"BenTest"},"DataSourceReference":{"protocol":"x-datasource","address":{"kind":"BenTest","path":"BenTest"},"authentication":null,"query":null},"ModuleName":null,"ModuleVersion":null}],"Details":"let\r\n    Result = BenTest.Configuration()\r\nin\r\n    Result","EndTime":"2022-09-28T13:36:11.7247293+00:00","Method":"PQTest.RunTest","Name":"BenTest.query.pq","StartTime":"2022-09-28T13:36:10.6115853+00:00","Output":[],"RowCount":0,"Status":"Passed","TraceFileLocation":null,"Type":"PQTest.Expression"}]

Expected Experience

Each argument should affect the output produced. E.g. -v detailed should add verbose details to the output and -v XUnit should change the formatting from JSON (the default) to XUnit-style.

Additional Context

No response

Different Global Environments: PBI vs. SDK - "Environment.*" visible outside of connector

In Power BI, the Environment.* set of identifiers are only visible from inside a connector. However, in the new SDK, these methods are visible from the .query.pq test file. Is this difference in the public global environment between the SDK and PBI intentional or something that leaked through? :-)

Repo

Running the below in the SDK returns the list: { "Environment.Libraries", "Environment.Configuration", "Environment.FeatureSwitch" }
Running it in Power BI's Query Editor returns an empty list.

let
    Public = Table.FromValue(#shared)[Name],
    JustEnvironment = List.Select(Public, each Text.StartsWith(_, "Environment."))
in
    JustEnvironment

"ConnectorInfo command --help" doesn't work

Preflight Checklist

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 ConnectorInfo is run without any arguments, it outputs the following text:

Usage: ConnectorInfo [arguments] [options] [command]

Arguments:
  Connector file   Full path to connector (.mez/.pqx)
  Expression file  Full path to a file containing an M expression (.m/.pq)

Options:
  -?  | -h | --help  Show help information

Commands:
  dsr      Extracts DSR from expression.
  kind     Returns data source kind information.
  module   Returns the module name or an error if missing.
  version  Returns module version information or an error if missing.

Use "ConnectorInfo [command] --help" for more information about a command.

However, the help option reported by the last line does not work.

Steps to Reproduce

PS> .\ConnectorInfo.exe dsr --help

Unhandled Exception: Microsoft.Extensions.CommandLineUtils.CommandParsingException: Unrecognized option '--help'
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.HandleUnexpectedArg(CommandLineApplication command, String[] args, Int32 index, String argTypeName)
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at ConnectorInfo.Program.Main(String[] args)

Actual Experience

A textual rendering of an exception is output.

Expected Experience

Descriptive help text should be output.

Additional Context

Similar exception output occurs if other -args values (like -x) are used. Instead, shouldn't a user-friendly error about -x being an invalid argument be displayed?

Date Output Serialization - has time component added

When a date is output, a time component is added to its serialized rendering. In the output, this makes it impossible to differentiate between a datetime with hour, minute and second set to zero, and a plain date.

It would be nice to be able to clearly differentiate between date and datetime values in the output.

Say I'm using a CI/CD tool to run a test PQ script, then have the tool compare the produced output with a set expected values. The inability to discern between some date and datetime values could lead to incorrect test results.

Example of Current Behavior

[DataSource.Kind="BenTest", Publish="BenTest.Publish"]
shared BenTest.Contents = () =>
    #table(
        null, 
        {
            {#date(2022, 1, 1)},
            {#datetime(2022, 1, 1, 0, 0, 0)}
        }
    );

Outputs as follows:

"Output": [
    {
        "Column1": "2022-01-01T00:00:00"
    },
    {
        "Column1": "2022-01-01T00:00:00"
    }
]

MakePQX.exe - Throws exception on argument errors

If the arguments passed to MakePQX.exe don't match its expectations, it has a tendency to throw an exception with stack trace, instead of displaying clean, concise error messaging.

Request: When command-line argument errors occur, could user-friendly errors be displayed without stack traces?

Examples of Current Behavior

When an invalid command is specified:

PS> .\MakePQX.exe x
Specify --help for a list of available options and commands.
Unexpected exception:
Microsoft.Extensions.CommandLineUtils.CommandParsingException: Unrecognized command or argument 'x'
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.HandleUnexpectedArg(CommandLineApplication command, String[] args, Int32 index, String argTypeName)
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.Mashup.MakePQX.Program.Main(String[] args) in C:\__w\1\s\Tools\MakePQX\Program.cs:line 207

When the expected arguments are not passed to a command

PS> .\MakePQX.exe compile
Unexpected exception:
System.ArgumentException: Build source directory: 'C:\[snip]\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.3\.nuget\Microsoft.PowerQuery.SdkTools.2.110.1\tools' Expect only one power query file ending with either .pq or .m
   at MakePQX.Tasks.TaskStash.CollectFilesForOneMezProject(String nullableProjectDirectory) in C:\__w\1\s\Tools\MakePQX\Tasks\TaskStash.cs:line 110
   at MakePQX.Tasks.TaskStash.BuildMezProject(String nullableProjectDirectory, String directoryName, String fileName) in C:\__w\1\s\Tools\MakePQX\Tasks\TaskStash.cs:line 146
   at Microsoft.Mashup.MakePQX.Program.<>c__DisplayClass3_1.<Main>b__5() in C:\__w\1\s\Tools\MakePQX\Program.cs:line 56
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.Mashup.MakePQX.Program.Main(String[] args) in C:\__w\1\s\Tools\MakePQX\Program.cs:line 207

PQTest.exe run-test dies when encountering a syntax error

Preflight Checklist

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

If a test query's contents do not conform to M's synatx rules, PQTest.exe run-test dies (exits abnormally).

While syntax errors are erroneous, unfortunately they are anticipated to occur during development, so should be gracefully handled.

Steps to Reproduce

In the SDK, change the test query's contents to be 1 +, then click Evaluate current file.

Actual Experience

PQTest.exe run-test
  --extension "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez"
  --queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq"
  --prettyPrint
[11:14:00 AM]	[Error]	[Task exited abnormally] pqtest run-test pid(21500) exit(4294967291) stderr: Error: exception while running expression.: Token Literal expected. Start position: (2, 28). End position (2, 29).

Expected Experience

  • PQTest.exe run-test should complete, gracefully reporting details of the error using a similar JSON format to what it outputs when evaluation completes successfully.
  • The syntax error should be reported in the PQTest result pane, similar to how an error raised by an M expression is displayed.

Additional Context

Rough idea for how lexer/parser errors could be reported out by pqTest:

[11:16:38 AM]	[Info]	RunTestBattery result [
    {
        "StartTime": "2022-10-19T15:16:37.3480863+00:00",
        "EndTime": "2022-10-19T15:16:38.3207362+00:00",
        "Method": "PQTest.RunTest",
        "Type": "PQTest.Expression"
        "IsSuccessfulEvaluation": false,
        "Status": "LexerParserError",
        "LexerParserError": {
           "Detail":  {same/similar structure goes here to what would be returned if the syntax error occurred inside a call to Expression.Evaluate -- e.g. Evaluate.Expression("1 +")}
           "Origin": {
              "Type": "File",
              "FilePath": "c:\Users\ben\Desktop\TestConnector\BenTest\BenTest.query.pq"
              "Location": { "StartPosition": "2, 28", "EndPosition": "2, 29" }
           }
        }
    }
]

If, instead, the lexer/parser error came from inside the packaged extension, then the Origin could change to something along the lines of:

           "Origin": {
              "Type": "Extension",
              "ExtensionName": "BenTest",
              "ExtensionPackage": "c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez"
              "Location": { "StartPosition": "2, 28", "EndPosition": "2, 29" }
           }

Ensure extension path value in settings.json file is correct when creating a new project

The default msbuild template sets the output path to bin\connector,mez, but the default settings.json file sets it to bin\AnyCPU\Debug\connector.mez.

We should decide on what we want to use for the default location for the SDK build and our initial msbuild file.

Existing .mproj files would likely be defaulting their output to bin\AnyCPU\Debug by default.

[Design] SDK vs. MSBuild

Our default connector template comes with an msbuild file (connector.proj), but defaults to using the SDK build mechanism. This might be confusing for users.

We should remove the .proj from our template if we are defaulting to the SDK build.

That said, generating a new proj file from scratch can be difficult, and it would be great to replace the existing .mproj file (which targets an older msbuild) with a newer/simplified .proj file that uses modern msbuild features.

Design questions

  1. Should we make the SDK build vs. MSBuild a choice when you create a connector?
  2. Can we add an "enable for MSBuild" command that changes the default build mode to msbuild and generates a new proj file based on the current workspace contents?

I don't feel strongly about (1), but I would lean towards not making a new connector option, since the use of msbuild is likely a more advanced scenario. I do see value in (2) though, especially as we continue to improve the default build template (making it easier to sign extensions, insert localization steps, etc)... but you could argue that a developer could simply copy their msbuild definition from published templates or samples.

On M Error, Output All 5 Error Fields

Preflight Checklist

Problem

Currently, PQTest.exe run-test only outputs an M error's message

Desired Solution

PQTest.exe run-test to output all 5 of an error's fields (Reason, Message, Detail, Message.Format, Message.Parameters), and possibly the location metadata

Alternatives and Workarounds

No response

Additional Context

These additional details can help with debugging (both when a dev. runs a test file from VSCode, as well as when wading through CI/CD logs after the fact).

pqtest set-credentials Command-Line Output Formatting Bug - arg -ak

Preflight Checklist

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 the "Set credential" sidebar option is used, the command that is echoed out to the output window contains quotes around the command-line argument "-ak".

Steps to Reproduce

Run "Set credentials" then observe the output window.

Actual Experience

[8:50:00 AM]	[Info]	[Task found] c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.7-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.110.3\tools\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

In the last line, notice the quotes around "-ak". This is incorrect. Quote shouldn't be used here.

Expected Experience

[8:50:00 AM]	[Info]	[Task found] c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.7-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.110.3\tools\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

Additional Context

No response

Setting credentials fails when multiple data sources are used

Preflight Checklist

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

Output Pane - Duration value can cause blank output pane

I'm enjoying playing with the new connector. I really appreciate the work the team has put into this. Thank you!

If it helps, here's another issue I ran into:

Apparently, a column that contains a duration can break the Output pane so that it displays nothing. :-(
image

In the generated JSON, duration values are rendered as nested objects, which I suspect is related to this problem.

"Output": [
    {
        "Employee": "Joe",
        "Hours Worked": {
            "Ticks": 4357230000000,
            "Days": 5,
            "Hours": 1,
            "Milliseconds": 0,
            "Minutes": 2,
            "Seconds": 3,
            "TotalDays": 5.043090277777778,
            "TotalHours": 121.03416666666666,
            "TotalMilliseconds": 435723000,
            "TotalMinutes": 7262.05,
            "TotalSeconds": 435723
        }
    },
    ...
]

Related: Instead of rendering out a duration's individual properties, would it make sense to use something like ISO 8601's duration format?

Repo

[Version = "1.0.0"]
section BenTest;

[DataSource.Kind="BenTest"]
shared BenTest.Contents = () =>
    #table(
        {"Employee", "Hours Worked"}, 
        {
            {"Joe", #duration(5, 1, 2, 3)},
            {"Bob", #duration(5, 1, 2, 3)}
        }
    );

BenTest = [
    Authentication = [
        Anonymous = []
    ]
];

#shared crashes pqtest.exe

If my .test.pq file returns #shared as its output, pqtest.exe crashes. :-(

let
    Result = #shared
in
    Result
[2:10:01 PM]	[Error]	[Task exited abnormally] pqtest run-test pid(2780) exit(3762504530) stderr: 
Unhandled Exception: System.ArgumentException: .NET number values such as positive and negative infinity cannot be written as valid JSON.
   at System.Text.Json.ThrowHelper.ThrowArgumentException_ValueNotSupported()
   at System.Text.Json.Utf8JsonWriter.WriteNumberValue(Double value)
   at System.Text.Json.JsonSerializer.WriteDictionary[TProperty](JsonConverter`1 converter, JsonSerializerOptions options, WriteStackFrame& current, Utf8JsonWriter writer)
   at System.Text.Json.JsonSerializer.HandleDictionary(JsonClassInfo elementClassInfo, JsonSerializerOptions options, Utf8JsonWriter writer, WriteStack& state)
   at System.Text.Json.JsonSerializer.Write(Utf8JsonWriter writer, Int32 originalWriterDepth, Int32 flushThreshold, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.JsonSerializer.WriteCore(Utf8JsonWriter writer, Object value, Type type, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.WriteCore(PooledByteBufferWriter output, Object value, Type type, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.WriteCoreString(Object value, Type type, JsonSerializerOptions options)
   at PQTest.Common.Commands.RunQueryTests(IEnumerable`1 queryTests, Configuration configuration) in C:\__w\1\s\Tools\PQTest\Common\Commands.cs:line 708
   at PQTest.Common.Commands.ConfigureMashupEnvironmentAndRun(Configuration configuration, Action action) in C:\__w\1\s\Tools\PQTest\Common\Commands.cs:line 584
   at PQTest.Console.Program.RunTestBatteryCommand(CommandLineApplication app, CommandLineApplication command, Action`1 invoke) in C:\__w\1\s\Tools\PQTest\Console\Program.cs:line 643
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at PQTest.Console.Program.Main(String[] args) in C:\__w\1\s\Tools\PQTest\Console\Program.cs:line 374

Output Format Suggestion - Table Rows vs. Records

The format used for table rows differs between when a set of rows is returned (i.e. as a table) vs. when a single row is returned (i.e. as a record).

For symmetry (and so simplicity of parsing), what would be the chances of these two formats aligning, so that the same format is used for a row regardless of whether it is in a table or returned as a record?

Details

When a table is output, a JSON array is returned. Each row is represented as a JSON object, with the column names mapping to property names and column values to property values.

// #table({"Col1", "Col2"}, {{"ABC", 123}, {"DEF", 456}}): 
"Output": [
    {
        "Col1": "ABC",
        "Col2": 123
    },
    {
        "Col1": "DEF",
        "Col2": 456
    }
],
"RowCount": 2

When a single row from a table is output (a.k.a. a record), instead of a single JSON object being returned for the row (as is used above for rows), the output format changes to a JSON array with each record field as a separate key-value style JSON object:

// Table.First(#table({"Col1", "Col2"}, {{"ABC", 123}, {"DEF", 456}}))
"Output": [
    {
        "Name": "Col1",
        "Value": "ABC"
    },
    {
        "Name": "Col2",
        "Value": 123
    }
],
"RowCount": 2

Environment.Configuration() - no ouput

Preflight Checklist

Power Query SDK

0.1.5

Regression From

No response

Platform

Windows

Architecture

x64

OS Version

Windows 10 Pro

VSCode version

No response

PQSdkTool Path

No response

Bug Description

Using the SDK, when Environment.Configuration() is run from inside a data connector, nothing is output. In contrast, when this method is run in Power BI from inside a data connector, various configuration key+value pairs are listed out (see below screenshot).

image

Should the SDK's output contain something similar?

Steps to Reproduce

  • Demo connector:
[Version = "1.0.0"]
section BenTest;

[DataSource.Kind="BenTest"]
shared BenTest.Configuration = () =>
    Environment.Configuration();

SomeHelper = 123;

BenTest = [
    Authentication = [
        Anonymous = []
    ]
];
  • Demo test code:
let
    Result = BenTest.Configuration()
in
    Result

Actual Experience

See problem description

Expected Experience

See problem description

Additional Context

No response

"Set credential" command should allow user provided values for data source kind and query file path

Preflight Checklist

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

The commands to set credentials should allow arbitrary user input.

Data Source Kind

  • Try to detect the current connector's data source kind(s) and display them in the drop down
  • Allow user to enter their own value

Authentication Kind

  • If we have a known data source kind, display the supported kinds
  • If we aren't sure, show all possible data source kinds in drop down

Query File

  • Drop down should show *.query.pq and *.test.pq files
  • Allow user to enter the path themselves

Steps to Reproduce

Run Set credential command

Actual Experience

N/A

Expected Experience

No response

Additional Context

No response

Misleading error when attempting to evaluate extension pq file ("the export <function> was exported multiple times")

I've found myself editing a connector's .pq file, then clicking "Evaluate current file" without first switching to the test .pq file.

When I do this, evaluation dies with an error complaining that an "export ... was exported multiple times" (for example, see the below). This is confusing as my code doesn't attempt to share two section members with the same name--so what I've written in my code doesn't align with the complaint received back.

Could this error message be revised to something more descriptive of the user-facing problem? Maybe some succinct variation of: "Sorry, you can't directly evaluate an extension file. Did you mean to instead evaluate a test file?"

[5:25:21 PM]	[Info]	RunTestBattery result [
    {
        "ActivityId": "e5441ead-91f0-46b3-802a-5b821e8570a0",
        "DataSourceAnalysis": [],
        "Details": "The export BenTest.Something was exported multiple times.",
        "EndTime": "2022-09-23T21:25:20.9928973+00:00",
        "Method": "BenTest.Something",
        "Name": "BenTest.pq",
        "StartTime": "2022-09-23T21:25:19.7544025+00:00",
        "Output": null,
        "RowCount": 0,
        "Status": "Failed",
        "TraceFileLocation": null,
        "Type": "PQTest.RunTest"
    }
]

Regressions

The following issues were reported as fixed in 0.1.5 yet can still be reproduced:
#100
#111

I don't have a way to reopen closed issues, so noting this in a separate issue to make sure these don't slip through the cracks.

[Connector project prompt] Add configuration setting to enable/disable project detection and prompt

Let's add a configuration setting for controlling the connector project prompt. Users might edit directories containing .pq files without wanting to be prompted by the SDK each time they open the workspace.

suggested name - powerquery.sdk.project.autoDetection ?
bool flag. When set to false, the SDK does not try to automatically detect connector workspaces and prompt to create a settings file.

Output Pane - Ignores column if value is null in first row

If a table's first row contains null for a particular column, the Output pane ignores the entire column (so values from it are not displayed for any row).

The below repo connector returns a table containing two columns; however, as the below screenshot shows, the Output pane skips displaying Column1.

Demo

Repo

[Version = "1.0.0"]
section BenTest;

[DataSource.Kind="BenTest"]
shared BenTest.Contents = () =>
    #table(
        null, 
        {
            {null, "col 2 - row1"},
            {"col 1 - row 2", "col 2 - row 2"}
        }
    );

BenTest = [
    Authentication = [
        Anonymous = []
    ]
];

Output Window Commands - Paths Containing Spaces Aren't Quoted

Hello Power Query SDK Team,

Congratulations on the first public preview release of the new SDK! Yay and thank you!!

Playing around with it today, one thing I noticed is that, in the Output window, when a command-line statement is rendered, paths that contain spaces are not surrounded with double quotes. If I try to copy one of these statements out of Output and run it from a command prompt, the attempt will fail because of the missing quotes.

Output Example:
image

c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.3\.nuget\Microsoft.PowerQuery.SdkTools.2.109.6\tools\pqtest.exe run-test --extension c:\Users\ben\Desktop\TestConnector\BenTest\bin\AnyCPU\Debug\BenTest.mez --queryFile c:\Users\ben\Desktop\TestConnector\BenTest\Ben Test.query.pq --prettyPrint

In the above, I believe that:
--queryFile c:\Users\ben\Desktop\TestConnector\BenTest\Ben Test.query.pq
should instead be represented as:
--queryFile "c:\Users\ben\Desktop\TestConnector\BenTest\Ben Test.query.pq"

Output Format Suggestion - Scalar Values

Preflight Checklist

Problem

Scalar values are output as single-column tables.

Desired Solution

Output scalar values as true JSON scalar values.

Alternatives and Workarounds

No response

Additional Context

Currently, PQTest.exe run-test outputs scalar values as though they were a single row table.

`// expression = 123
"Output": [
    {
        "Value": 123
    }
],
"RowCount": 1

The above output is indistinguishable from a true single-row table with a column named "Value".

// expression: Table.FromValue(123)
"Output": [
    {
        "Value": 123
    }
],
"RowCount": 1

To differentiate between the two, could scalar values be output as JSON scalar values? For example, ouput the M expression 123 as "Output": 123 instead of what the above examples show.

Feature Request: "Evaluate all files" command

The new SDK allows for multiple .query.pq test files. Yay! This opens up the door for groups of unit tests to be organized into separate files, as well as for ad hoc playground queries to be kept in separate file(s) from formal unit tests.

At some point down the road, could a "Evaluate all files" command be added which would iterate through all .query.pq files and run each, opening a separate PQTest result pane for each?

Thanks!

Environment.Libraries - How to run? :-)

Per #114, Environment.Libraries is included in the general Power Query global environment. However, attempting to run this method returns the following error:

Introspection functions aren't available in this context.

Is there something special I can do to successfully invoke this method?

Number Output Serialization - Truncated Values

In the output generated, some numbers are displayed using a truncated scientific notation syntax, even though Power Query internally stores the number with more precision.

Example: 56789012345678901234567890 is rendered out as 5.6789012345678904e+25. In contrast, in Query Editor, if an expression is defined as 56789012345678901234567890, the output rendered to screen is the full 56789012345678901234567890.

Request: Could the SDK's output be revised to display numbers with the same precision as Power Query sees them internally?

Idea - Migrate towards more structured project layout?

Both the legacy and current SDK expect an extension project's assets to be contained in a single directory (a flat structure; no subdirectories).

While this works, it brings with it some potential downsides, such as:

  • The compile process excludes certain files from the mez it outputs based on file extension (principally .test.pq files). Otherwise, it seems to bundle up everything into the mez. This can inadvertently lead to unexpected/unneeded files (such as the project’s readme) being packaged into the extension.
  • The flat structure limits the ability to organize files into related groupings (such as putting all test files together). While legacy SDK projects support only one .test.pq file, the new SDK allows multiple—which means more files can end up lumped into a single directory.

In contrast, many programming projects use a more structured project layout, where subfolders are used to group related files. For example:

/src -> contains code to build for distribution
/tests -> contains tests
{other files go here, as desired, such as a readme or license file}

Would it make sense to encourage PQ extension projects towards a more structured project layout?

Possible Implementation

An implementation of this might look like:

  • Have a configurable project setting specifying the subdirectory containing the extension’s actual code (default to:/src, or maybe something like /extension).
  • When the SDK triggers the build process, it passes makePQX compile the above-specified subdirectory.
  • makePQX compile would:
    • Assume that everything in the specified directory should go into the extension (so no more excluding files based on their extension; exclusions shouldn’t be needed as non-extension files [like .query.pq files], should not be in the /src subfolder).
    • Validate that exactly one .pq extension file is present. Error if not true.
    • Validate that no subdirectories are present. Error if not true. (Or should subdirectories be allowed in mez files?)
  • Disable the “Evaluate this file” action when a file in the /src directory is selected.
  • When creating new projects, the default template used should include/src and /tests directories.
    • Technically, though, the user can put their test files in any directory other than the source directory (including in multiple directories, e.g. /tests-quick and /tests-longrunning), as “Evaluate this file” would work on any .pq file that is outside of the source directory.

Test Methods in Public Global Environment

The public global environment (e.g. what the .query.pq file can see) contains a number of unit test-related methos (like Fact, FactCheck, FactSummarize, Theory, etc.).

Is the new SDK shipping with a built-in unit test framework, or is this something that leaked through?

Output: Row with just null value - column skipped

Normally, in the JSON object output for a table row, each column is represented by name. However, when a column contains a null, the column may be skipped in the JSON output.

Is this expected, or should the column still be rendered? To facilitate easy automated parsing of results, consistently including all columns in the output would be nice.

Repo

[DataSource.Kind="BenTest", Publish="BenTest.Publish"]
shared BenTest.Contents = () =>
    #table(
        null, 
        {
            {""},
            {null}
        }
    );

Output

Notice that the second row (the one associated with the null value) is missing an entry for Column1.

  "Output": [
        {
            "Column1": ""
        },
        {}
    ]

Sidebar Command - Listing Credentials -> List Credentials?

In the PQ SDK sidebar, all of the command names but one start with a non -ing verb. "Listing credentials" is the exception. Should it be renamed to "List credentials" to match the naming style used by the other entries in that menu?

image

Unable to set credentials for non-[DataSource.Kind] Web.Contents -> leads to multiple errors

Preflight Checklist

Power Query SDK

0.1.5

Regression From

Legacy SDK

Platform

Windows

Architecture

x64

OS Version

No response

VSCode version

No response

PQSdkTool Path

No response

Bug Description

When the legacy SDK is asked to evaluate an extension method not marked with [DataSource.Kind] that contains a call to Web.Contents, the legacy SDK prompts the user to set credentials based on the URL being accessed. Once set, the Web.Contents call successfully completes.

When the new SDK is used in an identical situation, going through the "set credentials" process in VSCode does not prompt for the credentials needed for Web.Contents, but instead dies with an error. Additionally, attempting to evaluate the PQ test script raises an M error complaining about the needed credentials being missing.

Steps to Reproduce

  1. Create the following connector
[Version = "1.0.0"]
section ConnectorPlayGround;

shared ConnectorPlayGround.WebCallHelper = () =>
    Web.Contents("http://bengribaudo.com");

[DataSource.Kind="ConnectorPlayGround"]
shared ConnectorPlayGround.Other = () => 1;

ConnectorPlayGround = [
    Authentication = [
        Anonymous = []
    ]
];
  1. Create the following test code file
let
    Result = ConnectorPlayGround.WebCallHelper()
in
    Result

Actual Experience

In the new SDK:

  1. "Set credentials" exits with an error
[Info]	[Task found] c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.5\.nuget\Microsoft.PowerQuery.SdkTools.2.110.2\tools\PQTest.exe set-credential
				--extension "c:\Users\ben\Desktop\TestConnector\ConnectorPlayGround\bin\AnyCPU\Debug\ConnectorPlayGround.mez"
				--queryFile "c:\Users\ben\Desktop\TestConnector\ConnectorPlayGround\ConnectorPlayGround.query.pq"
				--prettyPrint "-ak" Anonymous
[Error]	[Task exited abnormally] pqtest set-credential pid(2228) exit(4294967295) stderr: Error: Expected 1 data source in expression, but 0 were found.
  1. run-test reports an error complaining about missing credentials
[Info]	[Task found] c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.1.5\.nuget\Microsoft.PowerQuery.SdkTools.2.110.2\tools\PQTest.exe run-test
				--extension "c:\Users\ben\Desktop\TestConnector\ConnectorPlayGround\bin\AnyCPU\Debug\ConnectorPlayGround.mez"
				--queryFile "c:\Users\ben\Desktop\TestConnector\ConnectorPlayGround\ConnectorPlayGround.query.pq"
				--prettyPrint
[Info]	RunTestBattery result [
    {
        "ActivityId": "50799fa2-3597-4433-a8fa-e49dde2f3cf2",
        "DataSourceAnalysis": [],
        "Details": "Credentials are required to connect to the Web source. (Source at http://bengribaudo.com/.)",
        "EndTime": "2022-09-28T17:16:13.7799393+00:00",
        "Method": "PQTest.RunTest",
        "Name": "ConnectorPlayGround.query.pq",
        "StartTime": "2022-09-28T17:16:12.732765+00:00",
        "Output": null,
        "RowCount": 0,
        "Status": "Failed",
        "TraceFileLocation": null,
        "Type": "PQTest.Expression"
    }
]

Expected Experience

No response

Additional Context

No response

Fix readme numbering and dev install steps

  1. The numbering of the steps is incorrect (multiple 1's).
  2. Running vsce with a wildcard for the version results in an error

We should add vsce as a dev dependency and call it from the local node_modules bin directory. We can add it as one of the npm run scripts (package + install).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.