none
Error when putting a Query in a table and then do upload to model. RRS feed

  • Question

  • I definitely see an error, when I place a function, created from Query, into a table, and then try to upload into the model this table OR any expressions using this table. And it's happens even if the function is 100% NOT evaluated in the expression, i.e. you place it in expression something like this:

    if false then #"The Function"

    The real expression is:

    = Table.AddColumn(#"Развернутый элемент _Function", #"Target Name", each if [Название Функции] = null then null 
        else let f = if false then #"Выделение таблицы с данными" else null
        in if f <> null then f else Record.Field(L & L[Функции_Извлечения_Данных_из_Названий_Источников_Данных], [Название Функции]), type function)

    where the function name is #"Выделение таблицы с данными".

    So if I upload #"Развернутый элемент _Function" into the model, PBID crushes silently.

    If I do that code:

    = Table.AddColumn(#"Развернутый элемент _Function", #"Target Name", each if [Название Функции] = null then null 
        else let f = if false then null else null
        in if f <> null then f else Record.Field(L & L[Функции_Извлечения_Данных_из_Названий_Источников_Данных], [Название Функции]), type function)

    all works fine.

    Is M partly lazy or not :-)?

    Yes, of course, just because, as I wrote multiple times before, this error doesn't take place in PBID PQ UI AND in PQ Excel.

    And even if I hide the calling of #"Выделение таблицы с данными" in another function in the same Query, the PBID still crashes.

    I suspect that if I spend time for simplified repro, I won't reproduce an error on a simple example. I tried to do it before, and this is the closest example I achieved. In July release the problem still exists.

    Thursday, August 1, 2019 10:01 AM

Answers

  • Hi Andrey. This is due to a bug (which you reported earlier) in the modeling/loading layer when traversing the steps of an M query. I've filed it, and if all goes according to plan a fix should be included in a future release.

    Ehren

    Tuesday, August 6, 2019 5:18 PM
    Owner