## Indexed Dataset Parameter

Index Datasets are specialized data sets where values provided in data files can be selected based on an index value. The index can be assigned from any other parameter e.g. a customer id from an incoming request can be used to select a row of values in data file for discount codes.

## Index Dataset Details

- Index Parameter: This defines the parameter which is used as index from the available parameters.
- Parameter Name(s): It is the unique name for the parameter. Multiple parameter names can be given, separated by a comma.
- Header Line Number: This defines the header line in the given file.
- Column Delimiter: This defines the column delimiter of the file. The data will be spitted according to this delimiter.
- First Data Line: To define from where the data line has started.
- Fetch Parameters from Header: It is to get the parameter names from header line of the file.

Example:

If header line is "Name, AccountNo, CreditCardNo, Balance" and column delimiter is "," then parameters names will be "Name", "AccountNo", "CreditCardNo" and "Balance".

- Indexed Dataset File Name: This defines the file name from where the values need to be taken. Data file should have index parameter as first field.

  Note: In this field, the user can perform the following operations:

  - View: This option is used to view a file.
  - Choose: By selecting this option, the user can choose file from their local.
  - Import: By selecting this option, the user can import file from the database server. Once the user selects this option, a dialog box appears in which the user has to fill up the following details:
    - Database Type: It is the type of the database to be used.
    - URL Prefix: It is the prefix of the URL.
    - URL: It is the main URL.
    - User ID: It is the user id.
    - Password: It is the password.
    - Query: query to import the data from the database.
- Indexed Dataset Contents: Contents can be any combination of characters, numbers, special characters are also allowed. These contents can be loaded from an existing file from the server by specifying Dataset File name and clicking on View. User can also enter data in this field and upload it using 'Upload' button.

Note: If user wants to enter the contents in the tabular format, then the user can click on the Table Format checkbox.

## Advanced Settings

- Ignore Invalid Data Lines: This ignores the invalid data lines (lines with less or more number of fields).
- Default values if index parameter value is not found: In this option, the user has to enter a value which will be taken in case if the index parameter value is not found.
- Parameter fields whose value is from file: This option is used if user want to refer to contents of some other file for a particular column. Here user can tell which column means it is data and which column means a file path. The user has to enter the field numbers along with value or file. For example: If Field1 is value and Field2 is file, then enter F1=value; F2=file.

Example:

If file contains

001/home/netfunction/user1,LA
002/home/netfunction/user2,CA
003/home/netfunction/user3,NY

In parameter we will give F1=file; F2=value it means first parameter value will come from file path as specified in file and second parameter value will be itself. (LA/CA/NY).