|
Now that we've created a Job in Talend Open Studio (TOS) we need to start defining the source of our weather data and how it's structured. This definition then resides in our Repository and we can use it for as many jobs as we want.
In the top left of TOS, just under the Job name, you should see a section marked Metadata. Click the little triangle next to Metadata and then right click on File Delimited:

Click on "Create file delimited" to open the Metadata wizard. Enter a name for your source weather data (this can be anything you like; but no spaces). The other information is optional and once done click Next:

Step 2 identifies the file containing the weather data. Click Browse to locate your CSV file in the file system. The Format should be set to WINDOWS (unless you're using some other operating system). Once the file is located the File Viewer area should look something like the image below:

Click Next to move onto the next step. Step 3 defines how the individual fields in the data file are separated. The most common separator is a comma (hence Comma Separated Values or CSV). However TOS might default to a semi-colon field separator in which case you'll need to change to to a comma:

Here you can also specify whether the file has header or footer rows that should be ignored (Virtual Weather Station data files don't have a header row; but yours might). Once you're happy click the Refresh Preview button and you should see your data neatly formatted into columns as above. Click Next.
The final step in the wizard allows you to specify names for each of the columns of data. You could leave them as Column0, Column1 etc; but if you do you'll find it much harder later when it comes to map the source data onto the database table. This is what Step 4 looks like initially:

Click on each of the Column names and replace them with something meaningful. Here you'll need to know the order of each field in your data file and your weather station software documentation should be able to provide this for you. I know this will take a while; but believe me it will be worth it later. Here I've started to add some column names:

Once you've added all your column names click Finish and your navigation tree should look something like this:

That's the source for our weather data defined. In the next part we'll use that to do something useful.
 |