I am able to get the report specification XML using SDK and in which I can get the SQL to database. However if we use module/package the report specification does not contains the native SQL. Similar to Get Generated SQL in report studio. Is there a way to get the Native SQL (Generated SQL) using SDK.
Thank you,
TSB
I suppose yes, in cognos with SDK using BIBUS object looking for reportversion method and then SQL property.
There was sample code available on IBM for this, but it seems IBM has removed the URL.
http://www.ibm.com/support/docview.wss?uid=swg21344260
Yes, you can get the SQL via the reportService.validate() method. Two issues that need to be dealt with, however, are 1) prompt values need to be provided, if any are needed, and 2) you will have to use the Cognos SDK asynchronous conversation in order to run the validation to completion and retrieve the result.
Learning and getting the asynchronous conversation to work can take some time, but there is sample code for validation in the samples provided in the Cognos root directory. In Cognos 11, these samples are conveniently in the samples folder under the Cognos root. You will find Java examples there demonstrating how to submit a request that uses the asynchronous conversation and do things like submit prompt values and tell Cognos you are waiting and still interested in the result.
If you can actually get the request to completion, the detail property of the response will include an asynchDetailReportValidation object that has a queryInfo property. This XML will contain the SQL for each query the report would execute when run.
Related
Because of some requirements, we don't want to use the enrichment system where stream gets from its own collection the data objects.
In fact, we want to do it as the backend would do, using our own database, but directly from the client (because we don't use any database)
However, when retrieving the activities, we get the following: (iOS)
JSON decoding error: The data couldn’t be read because it isn’t in the correct format..
We create activities in the way that, actor is User:UserID, Object is Object:PostID, Verb:ActionEnum.
That's all we do.. but one more time, we are facing issues on iOS SDK..
Why?
To anyone having this issue, it was coming from the iOS SDK itself... It turned out that, using the REST API from our client solved the issue, but we had to use the "extra" field part of Go to deliver our required data :)
Hope it helps
I could see that the question came up often. By cons I have not yet found a solution to my problem. What I would like to do is allow my application to save the sqlite database containing user info on google drive. And also be able to make a daily backup of the data. With Xamarin android, I can't find much
You need to do it manually as of now there is no automated system for it.
RestSharp
NewtonSoft
You can use RestSharp for consuming RestApi of google drive and there is a great package NewtonSoft to convert your class objects to JSON and vice-versa.
I'm having some issues using a custom connector to get what I want out of the Microsoft Graph. Essentially, what I am looking to do is take the Email Activity User Detail report and turn it into a Power BI report.
The URL for that report is as follows:
/v1.0/reports/getEmailActivityUserDetail(period='D7')
In order to create this custom connector, I have been using the MyGraph Connector Sample as I'm not very familiar with the use of Power Query, nor the Graph API.
I have created the connector and can connect to the API and everything, but rather than return me the data, all the query does it return me a byte array I can't seem to do anything with.
From looking at Fiddler traces, the actual data I want is being picked up along the way, but it looks like the Graph API uses a redirect URL to the download, which I'm not sure my Power Query code is handling. I think it may just be returning the redirect URL as a string rather than the actual data.
Further to this, my query has no code to handle the NextLink if it goes over the number of returned rows (I think 200?), so I imagine it will not return the full dataset once I do get it working. How is this best handled?
Unfortunately, I am very new to Power Query (this is my first encounter with it, in fact), so I'm not sure where to begin to make the necessary changes to get what I need.
Any assistance would be greatly appreciated.
The Microsoft Graph API - GET Reports in Graph Explorer and Power BI question touches on a similar issue, though that is through the Application interface itself, which seems to be unable to get the necessary authorization tokens by itself.
EDIT: I have managed to fix the issue thanks to the advice from Marc LaFleur.
The problem was indeed that I was trying to use the Odata.Feed as the source. Changing the line:
source = OData.Feed("https://graph.microsoft.com/v1.0/me/", null, [ ODataVersion = 4, MoreColumns = true ])
To:
source = Csv.Document(Web.Contents("https://graph.microsoft.com/v1.0/reports/getEmailActivityUserDetail(period='D7')"))
Fixed the issue and returned the correct values with no other changes.
Microsoft Graph's Reports are not traditional REST endpoints. Rather than returning OData/JSON, they return a temporary URL to a physical file in CSV format.
From the documentation:
If successful, this method returns a 302 Found response that redirects to a preauthenticated download URL for the report. That URL can be found in the Location header in the response.
From the example you linked too, it looks like it is expecting an OData.Feed source (source = OData.Feed). In this case, you're not getting an OData result but rather a URL to a CSV file. I believe you're looking for Csv.Document instead.
Good morning,
I have a Kendo UI data source handling my oData request. The data source is sitting client side and as I filter it , it makes the necessary calls for me and I have some custom markup displaying results. I have a limit of ten records being returned and this is working fine.
On the back end I am using WebAPi 4.0.30506.0 and oData 5.6 (we are stuck with .net 4 ). This is resolving the queries nicely. No problems here.
The problem is that the client now wants to have the filtered data exported server side (data eventually going into a pdf or excel report) , does anybody have any ideas on how to cross the filter settings over to another call.
I have had some success chucking the whole ODataQueryOptions into the cache for each user , but this feels dirty and inefficient.
All ideas welcome.
After some serious google bashing I found this nuget package :
https://www.nuget.org/packages/LinqToQuerystring/
Examples here : http://linqtoquerystring.net/examples.html
I can now pull the filter value out as a string an reapply as necessary.
We're looking to create a tool to help with time management in Redmine. The issue we are currently having is that we want to get a list of issues that are watched by a particular user but can't find an API for it. Does anyone know if this is possible or are we just going to have to try and modify Redmine directly?
SOLUTION: Similar to the solution provided below by dmf85, I found a solution to this problem that worked for me. The Issues API takes a query_id as one of its parameters. What I ended up doing was filtering my issues by Watcher (like dmf85 said) then saving the query. I then used the query_id from that saved custom query in my API call.
At least in Redmine 3.1, there’s an undocumented parameter for the Issues API that allows you to specify a watcher directly: watcher_id. It works just like assigned_to_id, you can pass either a user ID (i.e. watcher_id=23) or the special string me (i.e. watcher_id=me).
An example of URL could be like the following: https://example.com/redmine/issues.json?watcher_id=me&key=redmine_api_key
Under your issues tab in the interface, click:
add filter
watcher
select a watcher in the box
Then, click the atom, csv, or pdf link at the bottom for a link that you can write a program to consume at your discretion.
Does this help?