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

Datastage gets the csv file and inserts it into the database

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Datastage operation flow

Creator of the document: Moonnight Maple

Date: 20180112

Version: V1.0

1. Processing files

The source file of this project comes from 10.126.124.39 server, 39 server does not turn on ftp function, but enables directory sharing function.

1.1.Use the bat batch script to copy the source data to the local server 10.126.124.14 and merge multiple files at the same time to facilitate subsequent datastage calls and improve efficiency, otherwise you need to run job in datastage multiple times

2. Create job and prepare global job parameters

Create job, configure job parameters, mainly include: link server parameters, link database parameters, system parameters needed in the process of data conversion

3. Create ftp source component 3.1. in the job interface, in the palette bar, get a process related component Ftp, and set the properties parameter

Note: the connect parameter is the login account password of the ftp of the server where the source file is located, which needs to be set by the network administrator.

3.2Parameter setting of Format

3.3.The parameter setting of column. Select the table difination you created and introduce it automatically. There are specific steps to create it in 4. 1.

3.4. Configure the parameters and check the configuration problems.

In figure 3. 1, there is a view data. If the configuration is successful, the data can be read here.

Note: if there is Chinese garbled, change the character set below

Click the button below to change

Select NLS to change the character set

4. To create the target component of Nettza database 4.1, you need to create a corresponding table difinition component of nettza database, save it in the corresponding directory and use it later.

Create step: on the main page

Import- à table difinition- à Start Connector Import Wizard-à Nettza Connector

-à enter account password address and other related information-à select the table you need, or the table that has been created

4.2. Create database target components

In the job interface, in the palette bar, get a database, select nettza connector, and configure relevant parameters.

Configure column parameters in the same way as 3.3.The explanation will not be repeated here.

5. Create transformer conversion rules

Create transformer, in the job interface, palette bar, get two link arrows to connect the three components according to the data twist direction.

Set the parameters of transformer

1. Click button 1 in the following figure to associate the component column with one to one.

2. If you need to process the data of the target table and select the place in figure 2 below, you can change the data type, convert the target data, and so on.

6. Testing

Save the file, compile, run, input parameters to run, test according to the log, troubleshoot bug

7. Create windows scheduled tasks

1. Enter the scheduled task manager

Start, control panel, systems and security, administrative tools, task scheduling, after opening

The interface is as follows

Right-click "Task Scheduler", create a task, and enter the task name and description

Finally, you need to enter the password of the administrator account

2. Change scheduled tasks

Double-click the properties of the click-open task, and notice that you change the properties to run regardless of whether you are logged in or not, and run with the highest permissions.

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

Database

Wechat

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

12
Report