Skip to end of metadata
Go to start of metadata

The Settings object contains configuration parameters such as the name of the REST provider, the name of the connector to be displayed in the ElastiCube Manager, the maximum number of data records to be scanned when determining a document's schema, and additional Configuration parameters.

JSON Format

 

Name

Type

Mandatory

Description

Provider

String

Yes

Provider system name. This name is used by Sisense to identify your connector and should start with the prefix "rest-" . For example, rest-marketo, rest-facebook, etc.

If you have multiple connectors using the same data source each with their own settings, the Provider system name should be unique, for example,

rest-facebook1

rest-facebook2

This string has the following limitations:

  • The null character (\u0000) cannot be part of a path name.
  • The following characters are not rendered well: \u0001 - \u0019 and \u007F - \u009F.
  • The following characters are not allowed: \ud800 -uF8FFF, \uFFF0-uFFFF, \uXFFFE - \uXFFFF (where X is a digit 1 - E), \uF0000 - \uFFFFF.
ConnectorAssemblyFileName StringYes

The value of this key should be set to _rest.tag when you want Sisense to automatically copy the REST Connector DLL file to you connector’s folder.

The advantage of this method is you do not need to add the Sisense REST Connector DLL file each time you upgrade Sisense.

When defining this key’s value, the FileList key must contain the name of your connector’s configuration files.

FileListArrayYes

The list of configuration files associated with your custom connector.

Typically, the values of this key are config.json, and oath.json.

This key is only mandatory when ConnectorAssemblyFileName is set to _reg.tag.

DisplayName

String

No

Name of the connector to be displayed in the ElastiCube Manager. If no value is set, the value of Provider is displayed.

SchemaMapFile

String

No

The name of the file with the schema. This file must be located in the same directory as your other Custom REST files. 
SchemaMapCatalog

String

No

The name of the schema catalog.
StringColumnLengthIntegerNoThe string column length for a table. 

MaxDocs

Integer

Yes

Maximum number of records fetched from a resource. This is used to determine a data schema.

FetchSize

Integer

Yes

Number of records fetched before caching data. For example, if FetchSize = 1000 and PageSize = 400, three calls will be executed before buffering. On the third call it will be calculated that current number of fetched records is more than 1000 and the next execution will be stopped for buffering.

OAuth2Config

String

No

File name of the OAuth2 configuration file. This value should be the same name as the Oauth2 configuration file located in your Connector folder.

IsAccumulativeSupportedBooleanNo

When True, accumulative builds are supported for the relevant tables within the ElastiCube Manager.

By default, this value is false.

To define which tables support accumulative builds, see AccumulativeSettings.

Parameters

Map

No

String -> String key-value pairs that can be used as parameters in other configuration sections. For more information, see Configuration.

RetryPolicyConfigsArrayNo

The retry policy array defines how and when Sisense should retry to query a custom REST data source when an error occurs.

In the Actions (Tables) object, you define which errors trigger the relevant retry policy.

The RetryPolicyConfigs array has the following properties:

  • Name: A unique name for the retry policy that you define. This name is used in the Actions (Tables) object in the CodeValues array to define a retry policy for an error.

  • NumberOfRetries: How many attempts should be executed before cancelling a request.

  • Delay: Initial sleeping period in seconds between attempts.

  • Factor: A multiplier for a next sleeping period. For example, if the value is 2 and the value of Delay is 10, on the second attempt, Sisense waits 2(Factor) * 10(Delay) seconds before attempting another request. On the third attempt, Sisense waits  2* 2*10 seconds, etc.

  • ContinueOnError. Defines Sisense’s behavior following an error.

     true: (Default) Continue execution.

     false: Throw an exception and stop execution.

 

Example


Settings
{
    "Settings": {
        "Provider": "rest-marketo",
		"ConnectorAssemblyFileName": "_rest.tag".
		"ConnectorAssemblyFileName": "_rest.tag".
        "FileList":  [   
           "config.json", "oauth2Config.json" 
         ],
        "DisplayName": "Marketo",
		"SchemaMapFile: "schema.json",
		"SchemaMapCatalog": zendeskSchema",
		"StringColumnLength": 1000,
        "MaxDocs": 100,
        "FetchSize": 1000,
        "OAuth2Config": "oauth2Config.json",
		"IsAccumulativeSupported": true,
        "Parameters": {
            "uri": "https://601-OXE-081.mktorest.com",
            "startDate": "2016-01-1"
        }
        "RetryPolicyConfigs":[ 
         { 
            "Name":"default",
            "NumberOfRetries":5,
            "Delay":70,
            "Factor":1,
            "ContinueOnError":true
         },
         { 
            "Name":"quick",
            "NumberOfRetries":3,
            "Delay":10,
            "Factor":1,
            "ContinueOnError":true
         },
         { 
            "Name":"average",
            "NumberOfRetries":10,
            "Delay":65,
            "Factor":1,
            "ContinueOnError":true
         }
      ]
    }
}
  • No labels