Getting started with the CommandLine Learn how to use the CommandLine

In this tutorial, you will learn how to launch the CommandLine.

The goal is to create a script that will allow you to execute a Job from your Repository without starting either the Integration Studio or the Administration Center.

Prerequisite:
Before starting this tutorial, you need to install and launch Talend Administration Center web application.

Download it!

Do you want to practice?

Download tutorialProject.zip includes all the jobs needed to carry out this tutorial. Please, download it!

You can also:
Send it!

Share it!

 


Commandline is the equivalent of Talend Studio without GUI.

To launch it, simply execute the commandline.bat file under Windows or the commandline.sh file under Linux, available from the root of your Commandline folder.

Commandline has three operating modes: Shell, Server, and Script.

Next

Step 1: Commandline in Standalone mode


Create the file allowing you to launch the commandline in Standalone mode:

  • Copy and paste the Commandline.bat file into your working directory
  • Rename it StandaloneCommandline.bat
  • Open this file and replace “startserver –p8002” with another command. For example, Type in the “help” command
  • Run the StandaloneCommandline.bat file. The help will display.

Standalone mode allows you to launch a single command via the commandline application.

Next

If the commandline executable isn't stored at the root of your Commandline: type in the syntax shown in the screenshot in the StandaloneCommandline.bat file.

  • Set the TISDirectory variable that defines the path to the directory in which your commandline is stored.
If you are using the Commandline script mode and store the scripts in a separate folder, you can use the ScriptFile variable as in the screenshot.
  • Set the ScriptFile variable that defines the path to the directory in which you stored your commandline scripts.
Save and close the file, and run it.

Next

The Commandline opens and the help displays.

Next

Step 2: Commandline in Shell mode


Create the file allowing you to launch the commandline in Shell mode:

  • Copy and paste the StandaloneCommandline.bat file into your working directory
  • Rename it ShellCommandline.bat
  • Open the renamed file and replace “help” with “shell
  • Execute ShellCommandline.bat

Save and close the file, and run it.

Next
This will allow you to access the commandline application in shell mode, which enables you to enter commands sequentially. If you enter the help command, you can access the help as shown above.

In this screenshot, we connected to a project of Talend Administration Center and listed the jobs of this project.
Next

Step 3: Commandline in Server mode


Create the file allowing you to launch the commandline in Server mode:

  • Find out the commandline port set at installation (by default 8002)
  • Copy and paste StandaloneCommandline.bat file into your working directory.
  • Rename it ServerCommandline.bat
  • Open the renamed file and replace the character string "help" with "startServer  -p  8002", where 8002 is the port on which your commandline application listens.
  • Execute ServerCommandline.bat

Next

You can remotely connect to a commandline in Server mode.

To do so, check the Commandline has been launched and type in the following command in a regular commandline window:
                         telnet  localhost  8002

Replace localhost by the IP address of the Talend Integration Suite server.
Replace 8002 by the port of the Talend Integration Suite server.

A new commandline windows pops up in which you can type in your commands, for example: the help command.


 

    Download it!     Send it!     Share it!

Do you want to practice?

Download tutorialProject.zip includes all the jobs needed to carry out this tutorial. Please, download it!

Friends / colleagues may be interested in this tutorial? Send it to them!

You liked this tutorial ? Support it!

[ top ]