Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
petrovnikitamai
Resolver V
Resolver V

Gateaway. Don't work scheduled update when I get data with invoke custom function

Do not work connection to odbc datasources in power bi service when i try to set schedule update If I get data from odbc with invoke custom function.

 

I have a table:

 x1.png

 

 

I have a custom function:

 

let
    Source = (source as text, nametable as text) => 
let
    query = Odbc.Query(source, "select * from "& nametable)
in
    query
in
    Source

 

 

Next step I invoke custom function and get data from table1 from odbc source1 and source2

 

let
    Source = {"dsn=source1","dsn=source2"},
    #"Table From List" = Table.FromList(Источник, Splitter.SplitByNothing(), 2,"table1", ExtraValues.Error),
    #"Rename Columns" = Table.RenameColumns(#"TableFromList",{{"Column1", "source"}, {"Column2", "nametable"}}),
    #"Invoke Custom Function" = Table.AddColumn(#"RenameColumns", "getData", each getData([source], [nametable]))
in
    #"Invoke Custom Function"

 

 

Next step I try to set schedule update with gateaway in power bi service and got connection error. 

 

But If I get data in this query, schedule update is work.

let
    Source = Odbc.Query(source, "select * from "& nametable)
in
    Source

 

Has anyone faced this problem? Can you help, pls?

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @petrovnikitamai,

 

I made a test following your steps, also I got this kind of error message. Is that the same as yours? Currently , dynamic custom function is still not supported on power bi service. so this issue will occur.

 

123333.png

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hello @v-frfei-msft! Thx for answer. Yes, I get the same error. Do you know another way How can I union same tables from 2 or more odbc datasource with support schedule update. I don't want write query every time for each datasource, i want dynamically add or delete name of datasource in one place and get data automatically?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.