gsimardnet / PowerQueryNet

Run M Language (Power Query Formula Language) from anywhere.
MIT License
189 stars 32 forks source link

Documentation on credentials format? #8

Closed hiptopjones closed 5 years ago

hiptopjones commented 5 years ago

When trying to load a CSV file in a .pq file via pqnet.exe, I get the following:

Credentials are required to connect to the File source.

I notice that pqnet has a credentials parameter, and in the samples download I see a credentials file that looks like this:

`

.\sql2016;AdventureWorks2012 Z:\TMP\eConnect\Archive\PM_Simplex_201702061100.xml Z:\Desktop\PowerQueryApp\MyExcel\List1.xls

`

Where can I find documentation on the credential format? What are the credentials that are needed for accessing a CSV file? Will I need a separate credential for each CSV file I'm accessing?

I didn't see any other issues around this, so maybe I am missing something obvious.

Thanks in advance.

gsimardnet commented 5 years ago

Hi,

To access you CSV file, you can create a specific credential of type CredentialFile like you see in the sample. You can also have a single CredentialFolder to access every files in that folder.

For instance, to access C:\MyFolder, the content of your credentials file would be : `

C:\MyFolder

`

Then you would need to use the -c argument to reference your credentials file : pqnet myquery.pq -c mycredentials.xml

hiptopjones commented 5 years ago

Great, thanks! That works.