Running projects using qLauncher
qLauncher is a Java-based utility, designed to run projects from batch files or a command prompt. The utility launches a load process remotely. The file, qLauncher.jar, is in the Tools folder of the installation files. qLauncher.jar is built using Java 1.7, and requires Java 1.7 in order to run.
The qLauncher command syntax is:
java -jar qlauncher.jar --url=[BIRT Loader Web Service URL] ‑‑file=[Credential project file name] ‑‑out=[log file name]
Parameters
--url
The BIRT Loader web service URL. This is a required parameter.
--file
The name of the project credential file. This is a required parameter.
--out
The name of the file to save the execution log. This is an optional parameter.
Example:
java -jar qlauncher.jar --url="http://localhost:8080/qloader/run" ‑‑file="callProject.tkn" --out="output.txt"
The qLauncher.jar file must be placed in the same folder as the project credential file. To obtain help for the command syntax, open a command prompt, and type the following:
java -jar qlauncher.jar
When you run a project, the utility changes the public key with the private key to log in to the BIRT Loader engine. To automate the data loading, include the command in a batch file.
How to run a project using qLauncher
This procedure runs a project remotely.
1 Generate a project credential file.
1 Log in to Admin in BIRT Analytics Loader.
2 In External call, select a project from the project list.
3 Choose Get file. Opening callProject.tkn appears, as shown in Figure 6‑8.
Figure 6‑8 Opening callProject.tkn
In Opening callProject.tkn, choose OK. Depending on the web browser, the file is saved in the configured download folder.
2 Create a folder for the remote project, run on your computer, for example:
C:\Load\qLauncher
3 Copy qLauncher.jar from the Tools folder of your installation files to the loading folder.
4 Copy callProject.tkn to the loading folder.
5 Open a command prompt CMD.
6 In CMD, navigate to the project folder. For example, type:
cd C:\Load\qLauncher
7 In CMD, type:
java -jar qLauncher.jar
The help for the command syntax appears, as shown in Figure 6‑9. This step is optional.
8 In CMD, type the command to run the project. In this example the command looks like this:
java -jar qlauncher.jar --url="http://dctest:8080/qloader/run" ‑‑file="callProject.tkn" --out="output.txt"
The project run finishes and the prompt appears, as shown in Figure 6‑9.
Figure 6‑9 Running qLauncher.jar
9 qLauncher saves the log file, output.txt, in the current folder. Listing 6‑1 shows the log outputs for the executed transactions.
Listing 6‑1 output.txt
- Loading process started at Fri Apr 26 14:12:30 PDT 2013
04/26/2013 14:12:31 - Starting project [MyFirstProject] at Fri Apr 26 14:12:31 PDT 2013
04/26/2013 14:12:31 - *INFO - Table: [SalesData].[Customers]
04/26/2013 14:12:34 - *INFO - Table: [SalesData].[Customers] - 122
04/26/2013 14:12:34 - *INFO - Table: [SalesData].[CarInventory]
04/26/2013 14:12:35 - *INFO - Table: [SalesData].[CarInventory] - 110
04/26/2013 14:12:35 - *INFO - Table: [SalesData].[DailyPurchases]
04/26/2013 14:12:36 - *INFO - Table: [SalesData].[DailyPurchases] - 35
04/26/2013 14:12:36 - *INFO - Table: [SalesData].[MonthlySales]
04/26/2013 14:12:36 - *INFO - Table: [SalesData].[MonthlySales] - 109
04/26/2013 14:12:36 - *INFO - Table: [SalesData].[SaleOrders]
04/26/2013 14:12:38 - *INFO - Table: [SalesData].[SaleOrders] - 326
04/26/2013 14:12:46 - *INFO - Table: [SalesData].[Employees]
04/26/2013 14:12:47 - *INFO - Table: [SalesData].[Employees] - 14
04/26/2013 14:12:48 - *INFO - Table: [SalesData].[Clients]
04/26/2013 14:12:49 - *INFO - Table: [SalesData].[Clients] - 122
04/26/2013 14:12:49 - Loaded tables: Customers,CarInventory,DailyPurchases,MonthlySales,SaleOrders,
Employees,Clients
04/26/2013 14:12:49 - Project [MyFirstProject] finished at Fri Apr 26 14:12:49 PDT 2013