I'm trying to write the following query
enter image description here
in Power BI OData Advanced Editor
I've tried to write in multiplke ways (here is an example)
enter image description here
But nothing seems to work (bad query error). How can I write down that query?
Related
I need to extract a table with test steps that correspond to each test case, from AzureDevops to PowerBI.
I was able to retrieve a list of tables that I can extract with odata, but none of them contains test steps. I’m attaching the metadata request and an extract of its results. extract
I’ve read that another possibility would be you to use an api query, but I’m not sure which one.
Does anyone know a possible solution?
Thank you.
According to the note in this documentation,
You can’t add fields with a data type of Plain Text (long text) or HTML (rich-text). These fields aren’t available from Analytics for the purposes of reporting.
And the type of the Steps field is Text (multiple lines), so they cannot be extract with odata.
You can try to use this REST API to get the detail of the testcase which will contain the Steps detail. Please refer the screenshot:
I have a view using a CTE that exceeds the maximum recursion, so I need to select from it using the hint
OPTION (MAXRECURSION 3650)
Is that possible? I do not seem to be able to find any information on it, other than the fact that is not working in the Source Query - any documentation on what you can do as far as SQL queries would be greatly appreciated.
Error message:
at Source 'Calendar': shaded.msdataflow.com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'option'.
Source Query:
select * from dbo.ReportingCalendar option (maxrecursion 3650)
The above query is correct and runs on the SQL Server.
I refer to this documentation, but there isn't information about keyword 'option'. I also test it with data flow, got the same error with you. So it seems not support this keyword.
As an alternative, you can use copy activity, it supports 'option'. You can copy data from your SQL database to Azure data lake gen2( or someplace else that data flow support as source), then use that as source in data flow and do some transform.
I'm connecting to a REST API to bring several tables into a Power BI file. I can connect to the API and retrieve the data without any issues using 'Get Data > Other > Web' from the main toolbar, and then entering a URL in the format:
https://api01.naturalhr.net/2.0/timeoff/key/(security key here)/format/xml
The data usually comes back quite quickly - within about 10-20 seconds.
My issue is that when I try to refresh the same data it usually times out after 5-ish minutes. To refresh I go to 'Transform Data (I think this was 'Edit Queries' in earlier versions) > Select the query I'm interested in (in this case 'timeoff') > Select the 'Refresh Preview' button on the main menu.
The source in the formula bar in the Power Query editor is again just:
= Xml.Tables(Web.Contents("https://api01.naturalhr.net/2.0/timeoff/key/(security key here)/format/xml"))
So I'm just trying to refresh the same URL with which I'd retrieved the data without any issues, but for some reason it is at best taking much longer, and more commonly just timing out altogether.
Note that I do have some transformations to the original data, but even when I remove all of these I am still seeing the time-out.
Can anyone explain why I can get, but not refresh, the same data? Many thanks.
###EDIT:
To add some further information to this, I've used the new-ish Power BI diagnostic tools to try to troubleshoot this. What I've noticed is that while the Resource column displays the original URL, the Data Source Query column appends the text 'HTTP/1.1' to the original URL. Please see the screenshot below. If I try to establish a new connection with the added text, the query times out. Can anyone tell me why the extra text is added, why this prevents the data being returned, and how I can work around this? Thanks
Power BI Diagnostics Output
Try this way in a blank query:
let
GetData =
let
source = Web.Contents("https://api01.naturalhr.net/2.0/timeoff/key/(security key here)/format/xml"),
xml = Xml.Document(source)
in
xml
in
GetData
Use Fiddler like #Rick Grimes said to see if your request is being sent normally.
I've been following the tutorial here:
Tutorial
I can get the odata uri parsed together just fine and get a json repsonse from azure devops that looks exactly like I expect. However when I take that same uri and use it as the odata source in Power Bi, I get the error:
Details: "OData: The property 'PartiallySuccessfulRate' does not exist on type 'Microsoft.VisualStudio.Services.Analytics.Model.PipelineRun'. Make sure to only use property names that are defined by the type or mark the type as open type."
If I remove them, the query works fine in powerbi.
Is there a way to make powerbi accept the computed columns? Or do I have to do the calculation in powerbi?
I would rather to these small calculations in power bi. I use most of the time Odata query for Dynamics as well. My main purpose of Oata query is to fetch only required data and not like millions of records.
Once this purpose is solved, I let powerbi do some calculations for me.
In this way it is easier for my Team to collaborate as well so that they can update/change as easily as they can.
Whenever I try to apply filter to an attribute, which has ValueSelection= Dropdown, the dropdown is not populated and error message "The requested list could not be retrieved because the query is not valid or a connection could not be made to the data source" is shown instead.
If I set up ValueSelection=List I am getting a different error message:
An attempt has been made to use a semantic query extension associated with the data extension 'SQL' that is not registered for this report server.
(Microsoft.ReportingServices.SemanticQueryEngine)
This happens within BIDS environment and was observed both in SQL 2005 and SQL 2008.
I've already studied articles, which discussed the similiar problem, but neither of them applied to my case. The user account in data source has all necessary rights, data could be retrieved without any problem (for example if i try "Explore data" in data source view). The SQL profiler shows that no query is being sent to SQL Server when there is an attempt to populate dropdown. So nothing is wrong with the query, it is simply never executed.
Your connection is not working. Try to test you connection by trying a simple table and query output.
This will enable you to test the connection before trying anything advanced.
Got this problem and in my case it was caused by wrong connection string in Data Source - instead of just having a SQL Server name like "SOMESQLSERVER_MACHINE" I had for some reason "SOMESQLSERVER_MACHINE.our.corp.domain". It had to be the same, but then I realized that the domain is wrong, after removing it all works like a charm again. That said: it's always good idea to start with detailed checks on your basic settings.
Otherwise this could be a problem with permissions to the folders on Report Manager.