Module: Olap::Xmla
- Defined in:
- lib/olap/xmla.rb,
lib/olap/xmla/version.rb
Overview
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.10"
- @@connect_options =
{}
Class Method Summary collapse
-
.client(connect_options = {}) ⇒ Object
Create a client, which can be used then to execute MDX queries.
-
.default_options=(options) ⇒ Object
Configure the default options to connect to XMLA server Can be optionally used to setup connection options in one place in application,.
Class Method Details
.client(connect_options = {}) ⇒ Object
Create a client, which can be used then to execute MDX queries
Example:
>> client = Olap::Xmla.client(server: 'http://your-olap-server', datasource: 'your-datasource', catalog: 'your-catalog')
>> response = client.request mdx
=> #<Olap::Xmla::Response:0x000001035b9510 @response={ ...
connect_options
* +:server+ - URL to connect to XMLA server (required)
* +:datasource+ - the name of datasource (required)
* +:catalog+ - the name of catalog (required)
* +:open_timeout+ - open timeout to connect to XMLA server, optional, default is 60 sec
* +:read_timeout+ - open timeout to read data from XMLA server, optional, default is 300 sec
* +:verbose+ - if set to true, write MDX requests to console. Default is false
44 45 46 47 48 49 |
# File 'lib/olap/xmla.rb', line 44 def self.client = {} = @@connect_options.merge raise "Connect options must define :server, :datasource and :catalog options" unless [:server] && [:datasource] && [:catalog] Olap::Xmla::Client.new [:server], [:datasource], [:catalog], end |
.default_options=(options) ⇒ Object
Configure the default options to connect to XMLA server Can be optionally used to setup connection options in one place in application,
Example:
>> Olap::Xmla.default_options = {server: 'http://your-olap-server', datasource: 'your-datasource', catalog: 'your-catalog'}
>> Olap::Xmla.client.request mdx
=> #<Olap::Xmla::Response:0x000001035b9510 @response={ ...
Look client connect_options for the list of options to be specified
23 24 25 |
# File 'lib/olap/xmla.rb', line 23 def self. @@connect_options = end |