Use Sub Query in Report shema - erp

I like to generate Report Using Sub-query.
Is there any way to Use Sub-query in Report Designer?
How to use aggregation functions?
Please guide me with short of example or give me sample screen ID

Related

is it possible to implement query rewrite & materialized view in generated OBIEE query

I have read a paper about materialized view selection in datawarehouse , and I have been trying to implement it in OBIEE, but the generated query from OBIEE are start using WITH Clause / CTE / Subquery factoring.
This query are not rewrited to materialized view as I expected, and its a similiar issue in this oracle community forum , but query rewrite work only when I create materialize view in base table on where clause as discussed in the paper above , but our generated obiee query use an extremely complex subquery factoring, then this won't make a significant increase in query speed.
I just want to know is it possible to implement query rewrite & materialized view in generated OBIEE query in terms of the discussion in the paper above ? Thanks.
Short answer: No. Longer answer: No, because that's not how the product is built. It's meant to be a source-agnostic query generator and analytics platform, not a programming platform to let you develop queries on your own. You need to understand how the product works, hoe IT optimizes queries and chooses its sources. There are literally dozens of ways to influence how your query is getting written but they are all semantic/structural configuration options. You do not write code in OBI.

How do I filter the results of an aggregation in IBM Watson discovery service

In Watson discovery service I am already aggregating my documents to get the top concepts. Using the following query:
term(enriched_metadata_text.concepts.text,count:10)
However, my source material is already concentrated around a few central concepts. In this case Ice Hockey, so what I want to do is be able to then filter out thosse concepts. with a query that looks something like this:
term(enriched_metadata_text.concepts.text,count:10).filter(enriched_metadata_text.concepts.text:!("National Hockey League"|"Ice hockey"))
This however does not work. I can get it to work if I filter first:
filter(enriched_metadata_text.concepts.text:!("National Hockey League"|"Ice hockey")).term(enriched_metadata_text.concepts.text,count:10)
The Issue with this however is it filters the documents with the concept "Ice Hockey" and then aggregates the results. I want to get the list of concepts and then filter THAT down, without lossing any documents.
Thanks in advance for your help.
I believe you should be able to accomplish your task with the nested aggregation to achieve your goal.
nested will scope the aggregation to the subdocuments (which is what the concepts are)
So my suggestion would be to run the following query:
nested(enriched_metadata_text.concepts).filter(enriched_metadata_text.concepts.text:!("National Hockey League"|"Ice hockey")).term(enriched_metadata_text.concepts.text,count:10)
Please let me know if this works!

Fast way to mockup hierarchical data easily

I'm seeking a quick and easy solution to help mock/populate/test an org chart (in ASP MVC), with tree based or hierarchical data. I need the test data for this...
I have used both http://www.generatedata.com and mock-aro (both of which I like, but the MS Sql data from the site doesn't work, it has multiple syntax errors, including issues with dates an date based data) and looked at redgate - which is not affordable, plus it never got the data right on the nested side.
What is the fastest/least effort way/tool to mockup hierarchy data like an org chart, with dept, name, cost and employees?
There is an online tool capable of generating graphs : http://graphgen.graphaware.com
It is based on the Cypher spec.
A simple pattern expressing Deptartment Org Chart, could be defined like this :
(Dept1:Department {name:word}*5)<-[:PART_OF *1..n]-(subDept1:Department {name:word} *10)
(Dept2:Department {name:word} *5)<-[:PART_OF *1..n]-(subDept2:Department {name:word} *10)
(ssd1:Department {name:word} *20)-[:PART_OF *n..1]->(subDept1)
(ssd2:Department {name:word} *20)-[:PART_OF *n..1]->(subDept2)
(employee1:Person {name:fullName} *50)-[:WORKS_IN_DEPT *n..1]->(ssd1)
(employee2:Person {name:fullName} *50)-[:WORKS_IN_DEPT *n..1]->(ssd2)
You can have a graph preview here : (click on generate after the page is loaded ) http://graphgen.graphaware.com/?graph=koWvmnBTW7JMR7
Also, there is the possibility to import the graph data in your database (even your local db) , create a neo4j console or get a graphjson format.
Don't hesitate to adapt to your needs and try the tool, the documentation is available here : http://graphgen.graphaware.com/documentation
Also, you can ping me on twitter : https://twitter.com/ikwattro for further questions regarding graphgen.
Chris

Is it possible to alias or rename fields in YQL?

I'm making a bunch of YQL queries at once & have a standard way of accessing the fields on the server. Unfortunately one of the feeds uses a different name than the rest for a field so I was assuming I could alias it within YQL.
Something like:
SELECT title, link, encoded AS description FROM...
But it looks like YQL's parser doesn't like that as I get this error:
Syntax error(s) [line 1:37 expecting field got 'AS']
So, is it possible to alias fields in YQL like you can in SQL? I don't seen anything in the YQL docs or on the internet at large.
Tacking another (small) question on as well, is there a spec anywhere for YQL's syntax?
No, it's not possible to do an alias in the YQL query. (As #codeulike mentioned, it's really not true "SQL" like you might find in MySQL or other databases.)
One capability that might help your needs is the ability in Open Tables to create an alias for parameter names. See the YQL Open Tables documentation and search for "alias".
I think YQL corresponds to SQL in only a metaphorical sort of way; although it superficially uses things like SELECT, it doesn't try to cover much of the breadth of SQL. Hence if its not in the documentation, its probably not possible.
In this guide: http://developer.yahoo.com/yql/guide/select_statement.html ... aliasing of fields is not mentioned, so I figure its not a feature.
Although, if you run your YQL query through Yahoo Pipes, you can use their Rename module to rename elements of the data.

fogbugz: Is there a way to view the history of a case using the api

I want to get all the history of a case. Is this possible through the api?
Execute the search command, supplying the bug ID as the query (q parameter) and asking for the events column in the results (with the cols parameter). The URL for this will look like:
http://server/api.asp?cmd=search&q=1000&cols=events&token=xxx
In the returned XML, the <case> element (there will be just one if the bug ID is valid) will have an <events> child element with <event> children containing the history; the XML format is documented in the API documentation. If you just wanted to dump the comments on a case, for example, you could enumerate the results of the XPath query /response/cases/case/events/event/s.
The folks at Fog Creek Software have started a fantastic "StackExchange" using, essentially, the same software as Stack Overflow. You might want to check it out.
Fogbugz Knowledge Exchange

Resources