sio / libpq Goto Github PK
View Code? Open in Web Editor NEWDetach your M code from workbooks to reuse it! Import modules from local or web storage (unlimited number of sources)
License: Apache License 2.0
Detach your M code from workbooks to reuse it! Import modules from local or web storage (unlimited number of sources)
License: Apache License 2.0
Looks like LibPQ can not be used in PowerBI service because of providing dynamic arguments to Web.Content()
. This page is the place to discuss, develop and test possible workarounds.
I have no account with PowerBI service, so I will need outside help to do the tests
Add support for column-or-listofcolumns style value for key_field parameter, like that of many functions in standard library
Hello! If you are using LibPQ (or have used, or have tried to use it but something didn't work out for you) - please leave some feedback in comments below.
Any feedback beside the three points above is also greatly appreciated! Thank you!
Update relative links after moving Unittesting docs
As the number of tests grows, the test modules create unnecessary clutter in the Modules/
directory.
We need to:
Tests/Tests.Name.pq
seems redundant but tests module names still should not collide with normal module namesLibPQPath.sample.pq
to enable importing testsAdd a basic framework for writing and executing unit tests
When a unit test file has an error in it, the entire file's tests disappear from the UnitTest Results. To Reproduce do the following:
The Test.MicrosoftUnitTestDemo tests are no longer listed. It would be more desirable to list the file as a single row with an error. I've looked through the code, and tried a number of things, without success, so thought it was worthy of an "Issue".
I'm glad to help with resolving, if someone could give me some pointers.
Originally posted by @B-D-T in #12 (comment)
I apologize if I'm missing something, but it appears that adding LibPQ breaks the Power Query intellisense. In Excel workbooks where I don't have LibPQ/LibPQPath, I get the intellisense function list, arguments, etc. But for those where I've integrated LibPQ, the intellisense only reads objects that were defined within the existing module.
Almost all my work is done directly in M in the Advanced Editor. Having intellisense makes that process easier, but now that I've discovered the wonderful LibPQ, I don't want to give that up either! Any suggestions?
Add some metadata to imported queries/functions:
Do not overwrite existing metadata
See: https://ssbi-blog.de/technical-topics-english/writing-documentation-for-custom-m-functions-part1/
Single test (one function): testName = () => Assert
Subtests (list of functions): testName = {()=>Assert, ()=>Assert, ()=>Assert, ...}
Changes can be stitched into the line below. We can invoke single test function or run all test functions in a list of subtests if needed.
Line 44 in 4d4e1e0
Maybe:
Allow optional second argument to LibPQ() that passes the path record to override LibPQPath
I was considering allowing to override the values provided by
LibPQPath
for some calls, e.g. if you'd wantLibPQ("CoolModule")
to return one thing in one report and another thing in another one - both in the same workbook. I have not encountered a use case for this idea, so I've just left it at that.
Code does not match the screenshot
Currently LibPQ overwrites metadata that was defined on the type of the value when processing docstring
Undocumented feature: LibPQ treats multiline comment on top of the source code as a docstring
Create VBA function (on Workbook_Open) to update the path to the current directory and the current workbook in the custom query.
Idea:
ThisWorkbook =
[
folder = "C:/Docs/",
path = "C:/Docs/Workbook.xlsm",
filename = "Workbook.xlsm"
]
Inspired by http://excelunplugged.com/2018/01/23/modifying-power-query-m-code-with-vba/
If module import errors out, show last error message that is not "file not found"
LibPQPath
is more of an API than a constant. This needs to be documented.
Hi,
Microsoft have also release a unit testing framework for powerquery, though it requires the framework to be in the same file, by the looks of things.
It would be good if the unittest module could also cope with unit tests expressed as Facts, to make it easy for people who started in that framework to port it to the LibPQ way of doing things
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.