Using External call
External call is used to display a credential security file for a project, as shown in Figure 6‑7. The credential file enables you to run a project remotely, from a command prompt, or a batch file. Typically, projects contain load and transformation instructions. You can control what instructions are executed from Data and Transform options in Projects management.
Figure 6‑7 Getting a credential security file
The credential file contains encrypted information about the current date and time, the project name, and security information associated with the system where the product is installed. This information includes security keys that the BIRT Analytics Loader installer generates and saves in this folder:
C:\Program Files\BIRTAnalytics\data\FastDB\Loader
Public-key encryption uses two different mathematically related keys, known as a key pair, to encrypt and decrypt data. Information encrypted using one key can only be decrypted by using the other member of the key pair. The names of the keys are:
*qloader.pbl
Public key, associated with the system where the product is installed
*qloader.prv
Private key, used to decrypt the information encrypted with the public key
These files are only valid on the server where they are created. If these files are deleted, you can regenerate them by reloading the BIRT Analytics Loader web application to the Tomcat web server. Every time you reinstall the product, you must regenerate the load processes again.
The following activities are available:
*Select project
A drop-down list of the projects is available.
*Get file
Generates a credential token for the selected project. This token launches load processes remotely, or from batch files. By default, the project file name is callProject.tkn. You can change the name by choosing a name specific for a loading project.
Running projects using qLauncher
The qLauncher is a Java-based utility that runs 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.8, and requires Java 1.8 in order to run.
The qLauncher command syntax is:
java -jar qlauncher.jar --url=[BIRT Analytics Loader Web Service URL] ‑‑file=[Credential project file name] ‑‑out=[log file name]
Parameters
--url
The BIRT Analytics 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:8110/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 Analytics 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. This opens the following screen used for opening and saving your project as a file names callProject.tkn file.
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‑8. 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://localhost:8110/qloader/run" ‑‑file="callProject.tkn" --out="output.txt"
The project run finishes and the prompt appears, as shown in Figure 6‑8.
Figure 6‑8 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 Mon Aug 27 14:12:30 PDT 2015
08/27/2015 14:12:31 - Starting project [MyFirstProject] at Mon Aug 27 14:12:31 PDT 2015
08/27/2015 14:12:31 - *INFO - Table: [SalesData].[Customers]
08/27/2015 14:12:34 - *INFO - Table: [SalesData].[Customers] - 122
08/27/2015 14:12:34 - *INFO - Table: [SalesData].[CarInventory]
08/27/2015 14:12:35 - *INFO - Table: [SalesData].[CarInventory] - 110
08/27/2015 14:12:35 - *INFO - Table: [SalesData].[DailyPurchases]
08/27/2015 14:12:36 - *INFO - Table: [SalesData].[DailyPurchases] - 35
08/27/2015 14:12:36 - *INFO - Table: [SalesData].[MonthlySales]
08/27/2015 14:12:36 - *INFO - Table: [SalesData].[MonthlySales] - 109
08/27/2015 14:12:36 - *INFO - Table: [SalesData].[SaleOrders]
08/27/2015 14:12:38 - *INFO - Table: [SalesData].[SaleOrders] - 326
08/27/2015 14:12:46 - *INFO - Table: [SalesData].[Employees]
08/27/2015 14:12:47 - *INFO - Table: [SalesData].[Employees] - 14
08/27/2015 14:12:48 - *INFO - Table: [SalesData].[Clients]
08/27/2015 14:12:49 - *INFO - Table: [SalesData].[Clients] - 122
08/27/2015 14:12:49 - Loaded tables: Customers,CarInventory,DailyPurchases,MonthlySales,SaleOrders,
Employees,Clients
08/27/2015 14:12:49 - Project [MyFirstProject] finished at Mon Aug 27 14:12:49 PDT 2015