MashZone NextGen 10.2 | Appendix | Operators | Data source operators | CSV
 
CSV
Reads the CSV file and writes the individual values (character strings) to table columns in the data feed based on the specified parameters. A change of column is identified by the specified separator between the individual values.
The following parameters are available.
Parameters
Description
Source
Text file, with values consistently separated using the same separators.
*URL: HTTP address for the source file.
If another operator dynamically supplies the URL, the URL cannot be edited here.
*URL alias: Alias of a URL configuration. Only URL aliases for that you have the Usage privilege are available. Select a URL alias. See Manage URL aliases for details.
*Local file: loads file from a resource directory. Files must be located in a defined resource directory on the MashZone NextGen server.
Refresh rate ()
Specifies the time until the source file is read in again. Default value is 12 h.
Path prefix (alias):
Alias of the resource directory with the path to a directory on the MashZone NextGen server. Available for Local file and URL alias as source.
Browse file alias (...)
Enables you to browse the resource directories with the alias defined. Click the Browse file alias (...) button and select the required source file. At least one resource directory must exist. See Manage resource directories for details.
Insert parameter ()
Inserts user defined input parameters at cursor position. The button is only clickable if at least one user input parameter, for example, Text user input, has already been inserted in the feed definition.
See URL parameter syntax for details.
Parameter options ()
Enables you to set input parameter options.
Authentication
Specifies a HTTP basic access authentication or an existing authentication defined in the MashZone NextGen administration. User name and password are required for accessing the source file.
HTTP headers
Adds HTTP headers to the URL.
Separator
Separates the column values in the CSV file. Available are comma (,), semicolon (;), space, tab and pipe ((l)), default is comma.
Get column names from row
Specifies a particular row that contains the column names.
Activate the Get column names from row option and enter the number of the relevant row.
Data from row
Specifies a particular row from that the data source values extraction starts.
Advanced parsing options
*Charset: Character set in which the source file is coded. This can be set manually if the extracted data refers to a different coding type. By default, the HTTP response encoding is used if available, otherwise UTF-8 is assumed.
*Masking: Protects the enclosed characters against being split at the separator. If column values contain the specified separator, they can be enclosed in a pair of masking charactersfor example "1,23". Masking characters can be set as required (available masking characters: single-quote ('), double-quote ("), none).
*Remove quote characters in column value: Removes the characters used for masking from the result data. If this option is deactivated, then the masking characters will remain as part of the result data.
*Sanitize names: Transforms column names such that they can be used as XML names, in the same way as EMML treats them. This affects names containing spaces or other special characters. If this option is deactivated, then the names are kept as is.
*Trim whitespace: Removes all leading and trailing whitespace from column values. If this option is deactivated, then any whitespace will be part of the result data.
*EMML parsing: Parses values in the same way as they are parsed in EMML. This affects parsing of numeric and date values. It affects whether a particular value is understood as a date or numeric value, because different sets of date patterns and locales are used. If this option is deactivated, then dates without an explicit time zone are assigned to the server's default time zone, while when this option is deactivated, they are assigned GMT.
Configure columns
Configures the columns list. Unselect a column for excluding it from the result data. Entering a New name for a column will cause that to be used instead of the original column name in the result. Clicking Reset columns will reload the column list from the data source and undo all changes in the list.
Upload CSV files to the MashZone NextGen Repository
If required, you can upload CSV files to the MashZone NextGen Repository.
See Add External Resources as MashZone NextGen Files for details.
To upload a file to the MashZone NextGen Repository administration privileges are required.
If you use an absolute URLfor example http://anyhost:8080/mashzone/files/admin_csv?1454486242000, then an authentication has to be set. All requests to the uploaded file will be made with the specified user / password combination.
If you use a relative URLfor example /mashzone/files/admin_csv?1454486242000, then an authentication is not required. All requests to the uploaded file will be made with the current logged in user.
In some cases, it might be necessary to grant view permission for a user. This can be done with the API console, e.g.:
{
"version":"1.1",
"sid":"PolicyService",
"svcVersion":"0.1",
"oid":"addPermissions",
"params":[
"fileName","type.entity.file","VIEW",
[{"principalId":"userID","principalTypeId":"User"}]]
}
*fileName is the name that was specified while uploading the file.
*userID is the id of the user, who should get the permission.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release