How to execute xmla command on iccube? - iccube

Seing cube_management page, I see we can execute xmla commands like LIST_SCHEMA_BACKUP
Seing xmla page, I see we can connect to xmla using http://localhost:8282/icCube/xmla in a navigator
Is there a way to execute directly commands from a navigator with something like http://localhost:8282/icCube/xmla?command="LIST_SCHEMA_BACKUP"
Or, what is the simplest way to execute a xmla command against iccube ?

There is currently no way to execute such a command using a REST like syntax. The best way is to use a script to wrap the actual SOAP call. You can look at this question for more details.
Hope that helps.

Related

Get API response under the Network Tab of Browser using Karate [duplicate]

I am writing UI automation script using karate DSL. In this at certain point I need to get value from network call in chrome. I want to interact with one of the webservice call in chrome devtools network tab and get the json response of that webservice.
I need this because I have to extract the value from that particular call and pass it on to the next step in my automation script.
I have seen the question related to sessionStorage(Is there a way of getting a sessionStorage using Karate DSL?) but I wonder how to do the same for network call using script command or any other way?
The first thing I would recommend is don't forget that Karate is an API testing tool at its core. Maybe all you need to do is manually make that call and get the response. You should be able to scrape the HTML and get the host and parameters needed.
That said - there's a new feature (only for Chrome) which is documented here: https://github.com/intuit/karate/tree/develop/karate-core#intercepting-http-requests - and is available in 0.9.6.RC2
It may not directly solve for what you want, but in a Karate mock, you should be able to set a value for use later e.g. by using a Java singleton or writing to a temp-file.
If there is something oddly more specific you need, please contribute code to Karate. Finally, there is an experimental way in which you can actually make raw requests to the Chrome DevTools session: https://github.com/intuit/karate/tree/develop/examples/ui-test#devtools-protocol-tips - it is for advanced users, but maybe you are one :)

gremlin - show query execution time

How do you show the query execution time for a gremlin query while running it a console such as Datastax Studio?
I tried
clockWithResult(100) { myquery }
But I get an error saying "cannot convert from int to Supplier"
I'm pretty sure that clockWithResult() is a function provided only by Gremlin Console and is not part of the Gremlin language itself. Other Gremlin tools (like DS Studio) don't have that specific feature that I'm aware of. If you really want to use that feature you should connect Gremlin Console to DataStax Graph and execute your query from there.
That said, clockWithResult() is just a member of TimeUtil which can be found here. You could either:
Try to modify the DS Graph sandbox whitelist to allow that class to be used and then use it through Studio OR
If that approach doesn't work for some reason, just copy/paste that function code to a Studio cell and use it directly (I'm mostly sure that would work, but haven't tried).

Simplest Way to Test ODBC on WIndows

With unixODBC you can use a simple command line utility called "isql" to test your connection and permissions of some queries. Without having to write extra code or install libs or bloated programs, is there a simple way to open up X data source send some sql commands and be done with it?
Doing this on the command line would be preferable.
One way to create a quick test query in Windows via an ODBC connection is using the DQY format.
To achieve this, create a DQY file (e.g. test.dqy) containing the magic first two lines (XLODBC and 1) as below, followed by your ODBC connection string on the third line and your query on the fourth line (all on one line), e.g.:
XLODBC
1
Driver={Microsoft ODBC for Oracle};server=DB;uid=scott;pwd=tiger;
SELECT COUNT(1) n FROM emp
Then, if you open the file by double-clicking it, it will open in Excel and populate the worksheet with the results of the query.
Make a file SOMEFILENAME.udl then double click on it and set it up as an ODBC connection object, username, pwd, target server
You can use the "Test Connection" feature after creating the ODBC connection through Control Panel > Administrative Tools > Data Sources.
To test a SQL command itself you could try:
http://www.sqledit.com/odbc/runner.html
http://www.sqledit.com/sqlrun.zip
Or (perhaps easier and more useful in the long run) you can make a test ASP.NET or PHP page in a couple minutes to run SQL statement yourself through IIS.
For ad hoc queries, the ODBC Test utility is pretty handy. Its design and interface is more oriented toward testing various parts of the ODBC API. But it works quite nicely for running queries and showing the output. It is part of the Microsoft Data Access Components.
To run a query, you can click the connect button (or use ctrl-F), choose a data source, type a query, then ctrl-E to execute it and ctrl-R to display the results (e.g., if it is a SELECT or something that returns a cursor).
a simple way is:
create a fake "*.UDL" file on desktop
(UDL files are described here:
https://msdn.microsoft.com/en-us/library/e38h511e(v=vs.71).aspx.
in case you can also customized it as explained there. )
It's been a while but since I precisely have the answer to the question, I'll share it and maybe someone will benefit from it.
Jaime de Los Hoyos wrote a very nice program to precisely do that: ODBC Query Tool.
Unfortunately, Jaime's website is defunct but you can still find the program and its source code at this location:
https://sourceforge.net/projects/odbc-query-tool/files/latest_release/
The program is GUI based and consists of a single executable file, no need to install anything on the machine.
Jaime's profile : https://stackoverflow.com/users/878998/jaime-de-los-hoyos-m
Jaime's posts on a forum talking about his program : https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/48266-odbc-query-tool-retrieve-information-from-any-database-easily

How do I fetch files with HTTP using Progress ABL?

Is there an easy way to fetch a file using an HTTP URL with Progress ABL 10.1B without external dependencies? If so, what is the most elegant way of doing so?
I tried the documentation, but didn't seem to contain anything like that.
I couldn't link through, but you can use sockets for this. Take a look at the doc here.

Executing a command programatically in Eclipse console

From my Eclipse plugin, I want to execute a command and show the results in the Console view (and later do some formatting and hyperlinking and pattern matching, which is done via the org.eclipse.ui.console.consolePatternMatchListeners extension point AFAIK). My question is how to do this? In plain Java, I would use a ProcessBuilder. Do I have to do this and bind the stdout/stderr somehow to a newly created console page or is there another way? Any pointers/experiences are appreciated.
Using Eclipse FAQ, this SO question and the ProcessBuilder, I managed to lazily create my console, show it and echo the input stream of the process to the console's message stream (instead of System.out).

Resources