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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Enterprise gateway duplicate data source error

I think there may be a fundamental problem with the enteprise gateway.   I have setup a brand new gateway and tried to create a datasource for the following URL's

 

https://www.google.com.au/?q=1

https://www.google.com.au/?q=2

 

I can only create a datasource for one of these, not both.   When I try to do both I get a duplicate data source error.   It looks like the enterprise gateway is stripping off the query string when checking for duplicates.

 

Unfortunately, this is a fairly serious limitation as when using Reporting Services (and most likely other web applications) much of the unique information is contained in the query string.

 

This has not been a problem in the past so looks like something that has recently been introduced.

Status: Accepted
Comments
v-haibl-msft
Employee

@presto

 

I've got response from Power BI Team.

 

Our current design doesn't support url queue parameter as different datasource. You can fix the problem by writing the query with [RelativePath] and [Query] in pbix files so that two query using same data source in "manage gateways" page. For example (Detail see the pbix file and image)
1. the datasource in pbix file and the "manage gateway" page = "https://www.google.com.au"
2. the query in guery1.pbix using Web.Page(Web.Contents("https://www.google.com.au",[RelativePath="/", Query=[#"q"="1"],Timeout=#duration(0,5,0,0)])) to get the data from url with query parameter
3. the query in guery2.pbix using Web.Page(Web.Contents("https://www.google.com.au",[RelativePath="/", Query=[#"q"="2"],Timeout=#duration(0,5,0,0)])) to get the data from url with query parameter-

 

Best Regards,

Herbert

presto
Frequent Visitor

Hi Herbert

 

Thanks for providing the workaround.  I haven't tested it yet (I'm on leave) but it looks like a suitable solution and may actually make it easier for us to manage the gateway.   I'll give it a go when I'm back at work and confirm it has solved the issue

 

Thanks

Anonymous
Not applicable

Hi Herbert,

 

I tried this method, and while it works in PBIX, it doesn't work in in the gateway. I am still getting a duplicate data source error. If I try to create a Web data source with just relative path, I am getting an error which says incorrect URL. 

 

Thanks

Kaz

michaeldurieux
Helper I

I need an update on this topic.

I have the same configuration :

 

https://myURL:myport/query?u=mydatabase&q=select * from tables 1

https://myURL:myport/query?u=mydatabase&q=select * from tables 2

 

When I add the first datasource it is OK.

When I add the second one, I have the following error message.

That is not suitable !

Thanks for your help and feedback !

duplicate.png

Anonymous
Not applicable

Hi @michaeldurieux

 

You can try the following ;

 

1 - Establish a master gateway entry in PBI Cloud which points to https://myURL:myport

 

2 - In your PBIX, after you get data from table 1, go to advanced query editor, and rewrite the source line using the relative path method.

 

3 - Publish your PBIX and you should be good to go.

 

This topology is working for us in production using reporting services. Let me know how you go.

 

 

Thanks

Kaz

michaeldurieux
Helper I

Hi @Anonymous,

 

First, thank you for your reply.

nevertheless, I block at the first step.

My datasource is a web source (API REST JSON) from Influx DB

 

database.png

Anonymous
Not applicable
Hi @michaeldurieux What does your Source line looks like in advanced query editor? And, what type of data source are you configuring in the gateway? Are you setting it as web or json? Just realised that although we can explicitly set your data source as JSON in PBIX, gateway and Cloud do not have an explicit option of setting the gateway to JSON. The closest it has is Web and oData. And, it looks like it is an proprietary JSON. Can you find and post the closest JSON link that you can find on the web? Thanks Kaz
michaeldurieux
Helper I

I use a web datasource connector (not the JSON one).

 

Example of my JSON : you can check this post on PowerBi Forum where I've already posted a thread for another issue. There is an example of my JSON