Can I run an MDX query in pentaho? - mdx

I have an MDX query I built by hand. I want to run it and see my results. Is there anyway I can run it on Pentaho? There are plenty of drag and drop to build my MDX query. But I want to paste one in (Or upload, or whatever) Is there a way to do that? Or a plugin I could use?

Related

Create a dynamic list of tables used by all the dashboards on the server

Is it possible to create something which extracts all the database/table names being used by multiple dashboards? We have a lot of old and new dashboards and we wanted to extract which tables are being used by the dashboards.
You can give this a try
https://help.qlik.com/en-US/governance-dashboard/Content/QV_GovDashboard/What.htm
It has a data lineage tab that can show you some stuff and I imagine help you to build your own custom solution
Im not sure that this is possible. Or at least not easy to achieve. In order to extract such info:
loop through all apps and extract the script
parse the Qlik script and find/extract all sql statements
parse these statements and extract the database/tables
Extracting the scripts is the easiest part here.
Isolating the sql statements might be doable but then parsing the sql will have to be done by something.
There is no complete Qlik script parser so potentially using string manipulations to extract the sql statements (imo depends on the sql complexity). (I havent lost hope to complete qlik-script-parser but have to spend a lot of time on it in order to complete it)
There are tools (like sqlformat chose output to be List DB Object) that can extract tables and fields but not sure if automation can be achieved.

RDLC Report Datasets/Tables and Custom Code

I've been given the task of updating some rdlc reports which I've never used before. Some of the more complex reports can have multiple datasets where each SQL query is over 10kb of text if copied to a text editor. I'm finding it difficult to wrap my head around some of the more complex SQL.
I've found that I can add custom VB code to the report and I was thinking it would be nice if I could use a simpler query for the dataset and then do some processing with custom code that could populate an empty table in the report. I haven't been able to find any examples of anything like this so I'm wondering if it's possible? If so, can anyone please give me a basic example of reading data from a dataset and adding rows to a table using custom code?
Thanks!

Test OpenSQL statements in the SAP GUI or Eclipse ADT?

I am writing an OpenSQL query, including joins and sub-selects, and I am unsure whether it works. To find out, I'd like to run it somewhere, look at the results, then change it, it an iterative way.
Traditional tools like transactions SE16 or SQVI don't help, because they have too little functionality (only one table, only joins but no sub-selects, etc.). Other threads with similar questions, like this one remained unanswered.
Of course, I could write a report or a unit test, paste my code there, and run it, but this makes the iterative cycle so slow because I need to change input and output data formats all the time. Optimal solution would be something like the SQL Console in SAP HANA Studio, but for OpenSQL instead of native SQL.
(on behalf of #Florian) Use the SQL console in Eclipse. it allows Open SQL SELECT, except FOR ALL ENTRIES and variables.
(on behalf of #JozsefSzikszai) software "OpenSQL Editor for SAP", by STA Consulting Kft. There is a 30 days trial period, so might be a short term solution only (unless your company buys it)
Use the tool ZTOAD, created by Sébastien Hermann : http://quelquepart.biz/article7/ztoad-requeteur-open-sql.
You may indirectly test the Open SQL statements by creating test classes (ABAP Unit), in which you use the class CL_OSQL_TEST_ENVIRONMENT (ABAP >= 7.52), which is used to mock the database, so you may provide false data, enter the expected result, execute the open SQL in test mode, and verify that actual result = expected result. It supports all Open SQL features.
All the above solutions allow testing Open SQL directly. Another solution is to use native SQL editors, and to write the Open SQL statements in the Strict mode (ABAP >= 7.40) so that they are closer to the native SQL syntax (especially the comma is to be used to separate the column names; but the alias separator has to be manually changed from ~ to .). There are two native SQL editors: one is a tool in ST04 or ST04N, one is the standard program RSDU_EXEC_SQL. Both display the result of SELECT statements in an ALV grid.
Good morning,
you could take a look into queries (SQ01/SQ02) instead of QuickViews in SQVI. In Queries you have a chance to enhance your Joins with coding and you are still able to test your "code". For incremental changes this might be your easiest way to go.
Regards

How can create a SQL Profile use this SQL Tuning tool (SQLBooster)?

I got this SQL tuning tool from www.SQLFast.com
It looks fantastic! I used it analyze a very complex query (more than 1000 lines in a single SQL). It automatically analyzed the SQL and helped find out the root cause. I ever tuned such complex query, which took me 10+ hour for troubleshooting.
The question is, I cannot restructure this query. This tool declares it can reuse the tuned SQL outline data and create a SQL profile based on it. How can I do it? The example is not clear enough...
Can anybody help?
You need to run the tuned SQL first, then go to the right-bottom (underneath the execution plan), click "Plan Outline", then click "Edit". Then you will be able to edit the outline data and apply the outline data to the selected SQL.

Comparing two SQL queries in Crystal Reports and performing calculations on separate data points

I'm not sure if this has been asked already but I'll take a shot and see what happens.
For my work we have been using Excel to generate all of our reports from instrument data. We recently implemented a Laboratory Information Management System that uses an SQL database and Crystal Reports to generate reports. I've had the fun (sarcasm) of recreating every report we run in Excel in Crystal Reports. There's one that I'm having the worst time to create. The report compares information for two samples. It compares information for one sample and then information from a replicate of that sample. I've tried every which way to bring in the data but it just repeats it for every record that's in the query. Here's a general idea of what I'm trying to accomplish:
I have two queries that bring in the same data. One query lists the original sample that I need and the second query lists the replicate that I need to use data from to calculate as well as every other sample. Essentially they're the exact same query. You can see below in the link.
Here is the query. http://tinypic.com/r/wiu591/8
For the report, I need to pull the data for two separate samples and compare it using crystal reports and perform calculations. Below is a picture of the report, the RER field is a calculated formula. I've brought in this query twice and before anyone asks "did you make links"....yes, I have and it just repeats the data because these are essentially two different records in two separate queries that are the same. I'm at a loss for ways to configure this.
Here is the gist on what the report needs to look like. I'm open if anyone can see a better way to redesign it. http://tinypic.com/r/123ayh1/8
NOTE: In the columns that say Sample and Replicate these ones are C10575 and C10575R and the data for each is below.
Any help would be awesome.
So the answer was to bring in two queries into the same view. I used the management studio to accomplish this. I brought in the two queries and didn't link them on the primary key which was the sample code. I linked on what these samples had in common. From there I did some fancy SQL'ing to sort out the samples I didn't need and presto. Got exactly what I need to throw into the crystal report and perform the calculations.