Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joshlong-attic/spring-birt

spring-birt
https://github.com/joshlong-attic/spring-birt

Last synced: 1 day ago
JSON representation

spring-birt

Awesome Lists containing this project

README

        

How to setup this application

=================================================================================
DATABASE

1) to setup the database, you need to setup the demo schema in MySQL:

mysql -uroot
create database classicmodels;
create user birt;
grant all privileges on classicmodels.* to birt@'127.0.0.1' identified by 'birt' ;
grant all privileges on classicmodels.* to birt@'%' identified by 'birt' ;

2) then load the SQL DDL to create the schema

mysql -ubirt -h127.0.0.1 -pbirt classicmodels < create_classicmodels.sql

NB: when you run this command the initial several statements at the head of the file are DROP TABLE commands. These commands should be removed as they will fail.

3) then, in the mysql/ directory in the ClassicModels folder in the archive that you can download from this page http://www.eclipse.org/birt/phoenix/db/#install (http://www.eclipse.org/birt/phoenix/db/mysqlscr/birt-database-2_0_1.zip)

mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/Orders.txt
mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/Products.txt
mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/Payments.txt
mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/Offices.txt
mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/OrderDetails.txt
mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/Customers.txt
mysqlimport --lines-terminated-by='\r\n' --fields-terminated-by=, --fields-enclosed-by='"' -uroot --local classicmodels datafiles/Employees.txt

or try:

mysql classicmodels --local_infile=1 -uroot -p < load_classicmodels.sql
if you use this approach the paths may need to be changed inload_classicmodels.sql to something similar to:
LOAD DATA LOCAL INFILE 'datafiles/customers.txt' INTO TABLE Customers
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n';