To connect a CSV Database Data Source go to Data Sources page.
Click on the green Add Data Source button and choose CSV Database.
Then you have to go through these steps:
1- File Details #
- Database: When uploading a file for the first time you'll be creating a private database under your Viur account, so we ask you to give it a friendly name.
- Table: The file you're about to upload will become a table, so here you can give that table a name.
- CSV file: Your CSV file. Make sure the file size is under 25MB.
- Column Separator: Typically CSV file columns should be separated by commas, but it's very common to find semicolons or tabs as separators. In this field put the correct separator.
- Text delimiter: If your file has the text columns that are delimited by quotation marks or other character you can define it here.
- File encoding: In this field you can choose the file encoding. If you are exporting CSV from Microsoft Excel it probably is in Windows-1250 encoding.
2- Data Types #
In this step Viur tries to guess the best data types for your data, but we ask you to revise and change them if needed.
To change a data type click on the pencil icon and change the data type.
Click on the pencil again to close the popup.
The file must contain headers for all columns. Headers must be unique.
There are 6 data types available:
- date & time
If the data type is Date or Date & Time you must define a mask so the dates are correctly parsed by Viur. Below are some example masks:
|19/08/2016 09:12:12 PM||dd/MM/yyyy hh:mm:ss a|
|19/08/2016 12:12:12||dd/MM/yyyy HH:mm:ss|
|19/08/2016 12:12:12.345||dd/MM/yyyy HH:mm:ss.SSS|
Date Formatting Reference #
|Mask Token||Date or Time||Examples|
|M||Month in year||July; Jul; 07|
|w||Week in year||27|
|W||Week in month||2|
|D||Day in year||189|
|d||Day in month||10|
|E||Day in week||Tuesday; Tue|
|H||Hour in day (0-23)||0|
|h||Hour in am/pm (1-12)||12|
|m||Minute in hour||30|
|s||Second in minute||55|
3- Review & Confirm #
This step is a confirmation screen and clicking Finish will upload your file.
Working with SQL over CSV Data
You can use the Drag & Drop mode with CSV Data, but if you choose to use the SQL code editor to perform data analysis over your CSV Data you can do so. Viur uses the H2 SQL syntax, please consult the H2 SQL grammar for more information.