Java Reference
In-Depth Information
In order to import the data you receive, you need to understand the format of the file you configure.
The file consists of two record formats: one for the customer and one for the transactions. Listing 10-5
shows a sample of the file format.
Listing 10-5. Sample of the customerTransaction.csv File
205866465,Joshua,Thompson,3708 Park,Fairview,LA,58517,3276793917668488
3276793917668488,SKT,5534,416811,2011-03-30 00:15:18
3276793917668488,KSS,5767,7074247,2011-04-02 07:00:08
3276793917668488,CSR,3887,6315693,2011-03-14 20:29:20
3276793917668488,EMD,8209,6445091,2011-03-19 18:52:56
3276793917668488,SYY,7980,9524343,2011-03-24 17:26:00
3276793917668488,BYM,4011,6870023,2011-03-05 09:35:18
This sample consists of the records for a single customer. The file you process for the example
contains records for many customers. The initial customer record consists of eight fields:
Social Security number : This tax id number is unique for each customer. Although
it isn't the primary key for the Customer table, it can be used to look up unique
First name: The customer's first name.
Last name: The customer's last name.
Address: The customer's street address.
City: The city the customer lives in.
State: The state the customer lives in.
Zip code: The postal code for the customer.
Account number: The identifying number for the customer's account.
It's important to note that for processing purposes, the customers you process already exist in your
database. This file is only used to update existing customers and accounts. Any record for a customer
who doesn't exist (identified by their Social Security number) is invalid.
The records after a customer record and before the next customer record are the transaction records
for the customer preceding them. Each transaction record consists of five fields:
Account number : The account number the transaction belongs to. This should
match the account number of the previous customer record.
Stock ticker: The stock symbol for this transaction. This is used later to obtain the
current price for the stock.
Price: The price of the stock when it was traded.
Quantity: The number of shares traded. Positive numbers mean the shares were
purchased; negative numbers indicate they were sold.
Timestamp: The date and time when the transaction was executed.
To process this file, you begin by defining the job and its first step. The job configuration, like all the
job configurations you've done in this topic, is located in the statement/src/main/resources/jobs
Search WWH ::

Custom Search