Giter VIP home page Giter VIP logo

pquery's People

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  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  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

pquery's Issues

Chaining M folder functions

Hi

I want to be able to chain 4 functions together that will be used to import xml files from a folder. It is the same file each query on a table in the file.

Which function in the repository is best for chaining the execution of M functions.

This is my thread where i was referred here as s last possible chance to get it working https://social.technet.microsoft.com/Forums/en-US/1d31402b-b05a-4091-8ce9-930481c34f93/combine-4-xml-queries-on-same-source-to-be-a-global-folder-query?forum=powerquery

Create release with xlsx file contained all the functions from repository

I found that for me copying queries from file to file is much more convenient than using Load function. I think that I'm not alone here. So I suggest to create a release in this repository with xlsx file, that would contain all the functions from the repository in it. I believe that it can help the distribution of pquery functions!

I forked the project to create a release, but I didn't find any way to create a pull request with this release. So I ask @tycho01 to use his file, or to use mine from the link:
https://github.com/power-bi/pquery/releases/latest

Doubt about stop List.Generate in Text.ContainsAny

Hello I've made a little modification in the function "Text.ContainsAny" to get a index from a list.

My doubt is how could I stop the List.Generate when I found a true value in "Text.Contains(str,needles{[i]})" ?

//Text.ContainsAny
(str, needles) as any =>
let
  needles = List.Buffer(needles),
  count = List.Count(needles),
  break = 0
in
  let
    idx = 
    List.PositionOf(
      List.Generate(
        ()=>[i=0],
        each [i] < count,
        each [i=[i]+1],
        each Text.Contains(str,needles{[i]})
      ),
      true
    ),
    output = if idx < 0 then null else needles{idx}
  in
    output

Operation is not valid due to the current state of the object

Problem Statement

There is a problem (bug?) in PQ around re-using function argument names on local variables (immutable though they are) within the function. This is not a problem if you invoke directly, but if you are invoking as a parameter in a host function, the above error is thrown. The problem occurs in...

  • Value.ToText
  • Type.ToText
  • Value.TypeToText

Resolution

All of these have an optional argument signifying recursive types and the same name is recycled in the function body. Simply change the name of the local variable and all is OK.

e.g. in Value.TypeToText change Recurs to _Recurs

let
    Source = (Value as any, optional Recurs as logical) as text =>
    let
        Recurs = if (Recurs<>null) then Recurs else false,
        Type.ToText = #"Load"("Type.ToText"),

        Type = Value.Type(Value),
        ToText = if Value.Is(Value, type type) and Recurs then
            "type " & Type.ToText(Value, Recurs)
        else
            Type.ToText(Type, Recurs),
        Return = ToText
    in Return
in
    Source

To

(Value as any, optional Recurs as logical) as text =>
let
    _Recurs = if (Recurs<>null) then Recurs else false,
    Type.ToText = Load("Type.ToText"),

    Type = Value.Type(Value),
    ToText = if Value.Is(Value, type type) and _Recurs then
        "type " & Type.ToText(Value, _Recurs)
    else
        Type.ToText(Type, _Recurs),
    Return = ToText
in Return

Took me a while to figure this out but, much shorter than writing it myself: thanks for the share!
I won't be using the dynamic loading, but it's the closest I've seen to a build tool in PQ.

#shared cannot be refreshed on Power BI service

It seems that #shared cannot be refreshed on Power BI service. It there is no workarounds, it means, that you cannot upload model from a workbook to Power BI and refresh it.
Setting off "Include in report refresh" in Power BI doesn't work in Power BI service.
It would be worth to mention that in the documentation.

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.