You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,7 @@ where('[Time].[2010].[Q1]').
181
181
execute
182
182
```
183
183
184
-
See more examples of queries in `spec/query_spec.rb`.
184
+
See more examples of queries in `test/query_test.rb`.
185
185
186
186
Currently there are query builder methods just for most frequently used MDX functions, there will be new query builder methods in next releases of mondrian-olap gem.
The `flush_region_cache_with_segments` method is particularly useful for partial cache clearing when you know which specific dimension members have changed data, avoiding the need to flush the entire cache.
239
239
240
-
See more examples of cache control in `spec/cube_cache_control_spec.rb`.
240
+
See more examples of cache control in `test/cube_cache_control_test.rb`.
241
241
242
242
### Query timeout
243
243
@@ -372,7 +372,7 @@ schema = Mondrian::OLAP::Schema.define do
372
372
end
373
373
```
374
374
375
-
See more examples of user defined functions in `spec/schema_definition_spec.rb`.
375
+
See more examples of user defined functions in `test/schema_definition_test.rb`.
376
376
377
377
### Data access roles
378
378
@@ -397,7 +397,7 @@ schema = Mondrian::OLAP::Schema.define do
397
397
end
398
398
```
399
399
400
-
See more examples of data access roles in `spec/connection_role_spec.rb`.
400
+
See more examples of data access roles in `test/connection_role_test.rb`.
See more examples of drill through in `spec/query_spec.rb`.
456
+
See more examples of drill through in `test/query_test.rb`.
457
457
458
458
### Additional schema options
459
459
@@ -483,7 +483,8 @@ end
483
483
REQUIREMENTS
484
484
------------
485
485
486
-
mondrian-olap gem is compatible with JRuby versions 9.3.x and 9.4.x, JVM 8, 11, and 17. mondrian-olap works only with JRuby and not with other Ruby implementations as it includes Mondrian OLAP Java libraries.
486
+
mondrian-olap gem is compatible with JRuby versions 9.4 and 10, Java 8 (deprecated), 11, 17, 21, 25.
487
+
mondrian-olap works only with JRuby and not with other Ruby implementations as it includes Mondrian OLAP Java libraries.
487
488
488
489
mondrian-olap supports MySQL, PostgreSQL, Oracle, Microsoft SQL Server, Vertica, Snowflake, and ClickHouse databases as well as other databases that are supported by Mondrian OLAP engine (using jdbc_driver and jdbc_url connection parameters). When using MySQL or PostgreSQL databases then install jdbc-mysql or jdbc-postgres gem and require "jdbc/mysql" or "jdbc/postgres" to load the corresponding JDBC database driver. When using Oracle then require Oracle JDBC driver `ojdbc*.jar`. When using MS SQL Server you then use the Microsoft JDBC driver `mssql-jdbc-*.jar`. When using Vertica, Snowflake, or ClickHouse then require corresponding JDBC drivers.
By default unit tests use MySQL database but PostgreSQL, Oracle and SQL Server databases are supported as well. Set `MONDRIAN_DRIVER` environment variable to `mysql` (default), `postgresql`, `oracle`, `sqlserver` (Microsoft JDBC), `vertica`, `snowflake`, `clickhouse`, `mariadb` to specify database driver that should be used.
4
+
5
+
If using a MySQL, PostgreSQL or MS SQL Server database then create database user `mondrian_test` with password `mondrian_test`, create database `mondrian_test` and grant full access to this database for `mondrian_test` user. By default it is assumed that database is located on localhost (can be overridden with `DATABASE_HOST` environment variable).
6
+
7
+
If using Oracle database then create database user `mondrian_test` with password `mondrian_test`. By default it is assumed that database `orcl` is located on localhost (can be overridden with `DATABASE_NAME` and `DATABASE_HOST` environment variables).
8
+
9
+
If using Vertica then specify environment variables `VERTICA_DATABASE_HOST`, `VERTICA_DATABASE_NAME`, `VERTICA_DATABASE_USER`, `VERTICA_DATABASE_PASSWORD` and create the `mondrian_test` schema.
10
+
11
+
If using Snowflake then create `MONDRIAN_TEST` user, database and schema and specify environment variables `SNOWFLAKE_DATABASE_HOST` and `SNOWFLAKE_DATABASE_PASSWORD`.
12
+
13
+
If using ClickHouse then create database user `mondrian_test` with password `mondrian_test`, create database `mondrian_test` and grant full access to this database for `mondrian_test` user. Specify environment variable `CLICKHOUSE_DATABASE_HOST`. Download the latest `clickhouse-jdbc-*-all.jar` and copy to `test/support/jars`.
14
+
15
+
If using MariaDB ColumnStore then create database user `mondrian_test` with password `mondrian_test`, create database `mondrian_test` and grant full access to this database for `mondrian_test` user. Specify environment variable `MARIADB_DATABASE_HOST`. Download `mariadb-java-client-*.jar` and copy to `test/support/jars`.
16
+
17
+
See `test/test_helper.rb` for details of default connection parameters and how to override them.
18
+
19
+
# Creating test data
20
+
21
+
Install necessary gems with
22
+
23
+
bundle install
24
+
25
+
Create tables with test data using
26
+
27
+
rake db:create_data
28
+
29
+
or specify which database driver to use
30
+
31
+
rake db:create_data MONDRIAN_DRIVER=mysql
32
+
rake db:create_data MONDRIAN_DRIVER=postgresql
33
+
rake db:create_data MONDRIAN_DRIVER=oracle
34
+
rake db:create_data MONDRIAN_DRIVER=sqlserver
35
+
36
+
In case of Vertica, Snowflake, ClickHouse, MariaDB ColumnStore at first create test data in MySQL and export test data into CSV files and then import CSV files into the analytical database (because inserting individual records into these analytical databases is very slow):
37
+
38
+
rake db:export_data MONDRIAN_DRIVER=mysql
39
+
rake db:create_data MONDRIAN_DRIVER=vertica
40
+
rake db:create_data MONDRIAN_DRIVER=snowflake
41
+
rake db:create_data MONDRIAN_DRIVER=clickhouse
42
+
rake db:create_data MONDRIAN_DRIVER=mariadb
43
+
44
+
# Running tests
45
+
46
+
Run tests with
47
+
48
+
rake test
49
+
50
+
or specify which database driver to use
51
+
52
+
rake test MONDRIAN_DRIVER=mysql
53
+
rake test MONDRIAN_DRIVER=postgresql
54
+
rake test MONDRIAN_DRIVER=oracle
55
+
rake test MONDRIAN_DRIVER=sqlserver
56
+
rake test MONDRIAN_DRIVER=vertica
57
+
rake test MONDRIAN_DRIVER=snowflake
58
+
rake test MONDRIAN_DRIVER=clickhouse
59
+
rake test MONDRIAN_DRIVER=mariadb
60
+
61
+
or also alternatively with
62
+
63
+
rake test:mysql
64
+
rake test:postgresql
65
+
rake test:oracle
66
+
rake test:sqlserver
67
+
rake test:vertica
68
+
rake test:snowflake
69
+
rake test:clickhouse
70
+
rake test:mariadb
71
+
72
+
You can also run all tests on all standard databases (mysql jdbc_mysql postgresql oracle sqlserver) with
73
+
74
+
rake test:all
75
+
76
+
# JRuby versions
77
+
78
+
It is recommended to use mise to run tests with different JRuby implementations. mondrian-olap is being tested with latest versions of JRuby 9.4 and 10 on Java 8 (deprecated), 11, 17, 21, and 25.
0 commit comments