Frequently, data from external sources (news feeds, currency exchange rates, sales prospect lists, weather forecasts etc.) needs to be retrieved and analyzed. Usually, this data is provided in CSV or XML file formats.
Younicycle can import this data into a custom, previously created, table. The steps below assume that you have created the data and you now wish to import it (usually from your desktop).
Step 1. Select the file (click Browse), select its file type and separation charcter. Commonly used separators are provided in the drop down list (: ; ' tab, space | ). In addition, you may designate your own delimiter based on the values in your file.
File - Browse file
File type - File type CSV or XML
Separation character - Column separator. Available only for CSV files
Import method - Method of import. Insert - adds records to a table. Update - updates the values of matching records in a table.
Next - Go to the next step.
Step 2. Mapping your table fields to the imported file:
Notice in the image below that the data file has UPPER CASE - while your Table has lower case. For the purposes of import - this difference is irrelevant. In fact, the name of the columns in your table do not need to match the names of the data file. An example: the data field header NAME could just as easily be CATEGORY. It is important that you name the columns of your Table so that they make sense to you and other users.
To begin the mapping process, click each drop down list - and select the appropriate column in your Table. Doing this will cause that column of data to map into that column of your Table. Continue until all desired columns are mapped.
Hint: Just because there IS data in a column, it does not mean that it must be imported. You can just skip it .
Hint: Importing may go much smoother if you do NOT have constraints in your Table structure. Otherwise, you may receive error messages as you try to import the data. You can always add Constraints after data import.
Skip first row - Ignores the first row of the file. Often in CSV files the first row contains column names that should not be part of the table. As an example, attempting to import the first row above for PRICE or CLOCK_SPEED or CACHE would not work if your Table had column types such as integer, numeric, real or double precision. Said differently, the word 'CLOCK_SPEED' is not a number - it is text.
Cancel - Cancels import
Import - Completes import and writes data into your table.
If you attempt to import and receive an error - read the error closely. Nearly always, it will give you an indication of something that is wrong (or unreadable) in your data file. Fix your data file in a text editor - and try again.