Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze kitchen.bat when kettle executes scheduled tasks

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about how to analyze the kettle implementation of scheduled tasks kitchen.bat, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Environment

Operating system: windows server 2008_x86

Etl:kettle6.0

Kettle is an open source ETL (short for Extract-Transform-Load, that is, the process of data extraction, transformation, loading) project, the name of the project is very interesting, kettle. According to Matt, the project manager: put all kinds of data in a pot, and then flow out in the format you want. Kettle consists of three blocks:

Spoon-- Transformation / work (transform/job) Design tool (GUI mode)

Kitchen-- work (job) actuator (command line mode)

Span-- conversion (trasform) executor (command line mode)

Kettle is a foreign open source etl tool, written in pure java, green without installation, efficient and stable data extraction. There are two kinds of script files in Kettle, transformation and job,transformation complete the basic conversion of the data, and job completes the control of the whole workflow.

Kitchen.bat can be followed by-or it can be / and then add options

Options:

/ rep: Repository name database name

/ user: Repository username database user name

/ pass: Repository password database password

/ job: The name of the job to launch job name

/ dir: directory of The directory (dont forget the leading /) job

/ file: file name of The filename (Job XML) to launch xml job

/ level: The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing) log level

/ logfile: The logging file to write to log file name

/ listdir: the directory listed in the archive by List the directories in the repository

/ listjobs: List the jobs in the specified directory lists the job in a specific directory

/ listrep: List the available repositories lists available archives

/ norep: Do not log into the repository does not log in to the archives

/ version: show the version, revision and build date view version and creation date

/ param: Set a named parameter =. For example-param:FILE=customers.csv

/ listparam: List information concerning the defined parameters in the specified job.

/ export: Exports all linked resources of the specified job. The argument is the name of a ZIP file.

/ custom: Set a custom plugin specific option as a String value in the job using =, for example:-custom:COLOR=Red

/ maxloglines: The maximum number of loglines that are kept internally by Kettle. Set to 0 to keep all rows (default)

/ maxlogtimeout: The maximum age (in minutes) of a log line while being kept internally by Kettle. Set to 0 to keep all rows indefinitely (default)

Example

Write a test_job.bat as follows:

D:

Cd D:\ Program Files\ kettle\ data-integration

Kitchen.bat-rep kettlerep-user admin-pass admin-dir / job_dir-job job_name-level=basic > D:\ JOB_LOG\ job_input.log

-rep kettlerep specifies the name of the data archive

-user admin-pass admin username, password

-dir / job_dir specified directory

-job job_name sets the job name

-level=basic > D:\ JOB_LOG\ job_input.log sets the log level and output path.

Pan.bat

Options:

/ rep: repository name

/ user: repository user name

/ pass: repository password

/ trans: name of the transformation to start

/ dir: directory (don't forget the prefix /)

/ file: the name of the file to start (the XML file where the conversion is located)

/ level: log level (basic, detailed, debug, line level, error, none)

/ logfile: log file to write to

/ listdir: list the directories in the repository

/ listtrans: lists the transformations in the specified directory

/ listrep: list the available resource libraries

/ exprep: export all objects in the repository to a XML file

/ norep: do not write logs to the repository

/ safemode: run in safe mode: there are additional checks

/ version: displays the version, revision and build date

/ param: Set a named parameter =. For example-param:FOO=bar

/ listparam: List information concerning the defined named parameters in the specified transformation.

/ metrics: Gather metrics during execution

/ maxloglines: The maximum number of loglines that are kept internally by Kettle. Set to 0 to keep all rows (default)

/ maxlogtimeout: The maximum age (in minutes) of a log line while being kept internally by Kettle. Set to 0 to keep all rows indefinitely (default)

After reading the above, do you have any further understanding of how kettle performs scheduled tasks kitchen.bat analysis? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report