CSV Data Source

Last modified on 2022/05/28 10:52

Apps - Datasource - CSV icon.png This type of data source belongs to the Files category in the data source library. It is used to retrieve static data from CSV files (Comma-Separated Values, text format) located on the local server.
Once the file is uploaded, you should define its configuration. In particular, you should specify the column separator used to divide each row into columns.

Notes

   Open url.png  see General remarks on data sources

  • The data from the data source is not automatically refreshed. The app administrator must upload the CSV file again to update the data. 
  • If data changes on a regular basis, then you should use an Online CSV dynamic data source.

Example

ExampleCSVFile

You want to retrieve from a CSV file the number of incidents and requests per employee by department:

  • The file contains a header row ==> the First Line Contains Column Titles property is checked 
  • Column separator = ; (semicolon)
Data source
EVApps - datasource CSV - Example Datasource.png

Download Zip icon.png Download Example (CSV file)

EndCsvOnlineFile

List of properties

Content

LastModifiedUploadedFile

Last Modified Uploaded File: The date on which the file was last uploaded.

ChooseFile

Choose A File: Used to select the CSV file using the Open dialog box. Note: You can also select the file using a drag and drop.

Preview

Configure Field Types: Used to open the field editor that enables you to select data source fields and specify the type of each field, e.g. date, integer, etc. when this is not automatically detected.

  • The Apps - datasources Properties - Preview button.png button below the property shows the number of rows (max. 15) and columns extracted. Click to open the editor.
  • The button will display No data available as long as you have not selected any of the mandatory elements for the data source.
  • In edit mode, only the first 15 data source records are displayed.
  • In execute mode, all of the data source records are displayed.
  • Data in static data sources comes from the last file upload.
  • Data in dynamic data sources is refreshed when you open the app in edit mode.
AutoRefresh

Auto Refresh (Note: Only for dynamic data sources): Used to indicate the automatic refreshment interval for data from the data source in hours/minutes.

  • Data is automatically refreshed each time the app is run and each time the page is redisplayed, regardless of whether it is in execute mode or edit mode.
  • Caution: The updating of data requires additional activity on the Service Apps platform.

     Best Practice icon.png

  • You should define an automatic refreshment interval only if the app is required to constantly display real-time data for long periods of time on screen.

    example  View dashboard data

  •  You should not specify an automatic refreshment interval if the app is only used for displaying a snapshot of data.

    example  Display a portal where catalogs can be consulted

SelectFirstRowAsCurrentRecord

Select First Row As Current Record: Used to indicate if the first record of the data source, when displayed in widgets, is selected by default (box is checked) or not (box is not checked).

NoDataMessage

No Data Message: This message is displayed when the data source does not contain any data.

  • Enter the code directly in the field or click Apps - Edit Html icon.png to open the text editor
FirstLineContainsColumn

First Line Contains Column Titles: Used to indicate if the first row of the data source contains the Dimension and Measures column headers (box is checked) or if it contains values (box is not checked). Open url.png See Standard data source structure.

Box is checked Box is not checked

Apps - datasources Properties - First line Headers.png

  • The first row contains column headers.

Apps - datasources Properties - First line Values.png

  • A header row is automatically created.
  • The Dimension and Measure columns will be numbered from 0 to N so that they can be identified in the Data Transformer.
ColumnSeparatorCharacter

Column Separator Character: Character used to separate data into columns in the CSV file. It can be a comma, semicolon or tab.

  • Click the button below the Configure Field Types property to preview your configuration.

    example  CSV file row: Service, Incident per Employee

  • Column separator = comma ==>  The row is divided into 2 columns: Service; Incident per Employee
  • Column separator = tab ==>  The row has only 1 column: Service, Incident per Employee
ColumnEnclosingCharacter

Column Enclosing Character: Character used to identify or delimit text in the CSV file (usually double quotes). This helps prevent any conflict due to the use of a column separator (defined in the Column Separator Character property) within a column.

  • Click the button below the Configure Field Types property to preview your configuration.

    example  CSV file row = Incident per Employee, "2,7" (column separator = comma)

  • Text delimiter = double quotes ==>  The row is divided into 2 columns: Incident per Employee; 2,7
  • Text delimiter = unspecified ==>  The row is divided into 3 columns: Incident per Employee; "2 ; 7"
ColumnEnclosingCharacter

Column Enclosing Character: Character used to identify or delimit text in the CSV file (usually double quotes). This helps prevent any conflict due to the use of a column separator (defined in the Column Separator Character property) within a column.

  • Click the button below the Configure Field Types property to preview your configuration.

    example  CSV file row = Incident per Employee, "2,7" (column separator = comma)

  • Text delimiter = double quotes ==>  The row is divided into 2 columns: Incident per Employee; 2,7
  • Text delimiter = unspecified ==>  The row is divided into 3 columns: Incident per Employee; "2 ; 7"
LineSeparatorCharacter

Line Separator Character: Sequence of characters used to identify a row change in the CSV file, i.e. modified record, based on the platform used:

  • In Windows: \n\r = CR (Carriage Return) + LF (Line Feed)
  • In Linux or Mac: \n = CR (Carriage Return)
DecimalSeparatorCharacter

Decimal Separator Character: Character used to indicate the decimal symbol in the CSV file. By default, this is a period (.).

ThousandSeparatorCharacter

Thousand Separator Character : Character used to indicate the thousands separator in the CSV file. By default, this is a space.

Integration example

Google Analytics Logo - Google Analytics.png 

Tags:
Powered by XWiki © EasyVista 2022