Gigya Job Openings

Page History

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titledatasource.write.gigya.generic

A generic component that can call any of Gigya's APIs, including those that write data to a Gigya database.

RequiredParameter NameTypeDefaultDescription
Yes
apiMethodstring The Gigya API method to call, including the namespace. For example: ds.store.
Yes
addResponseBooleanfalse

When set to true, the response received from the API is included in the output of this step. The response in sent as a JSON object in a _response parameter. For example:

Code Block
{
    "UID" : "***",
    "profile" : {
        "nickname" : "Torres",
        "firstName" : "Tammy",
        "lastName" : "Torres",
        "gender" : "f",
        "email" : "example@email.com"
    },
    "_response" : {
          "regToken": "***..",
          "statusCode": 200,
          "errorCode": 0,
          "statusReason": "OK",
          "callId": "***",
          "time": "2015-03-22T11:42:25.943Z"
    }
}

This response can then be used as input for the next step.

No
apiParamsarray 

An array of objects that contain a 'sourceField' or a 'value' property, and a 'paramName' property:

RequiredNameTypeDescription
Yes
paramNamestringThe names of the parameters in the API being used.
Varies
sourceField*string

The source field from which to take the value being written.

* You are required to pass only one of the parameters: sourceField or value.

Varies
value*string

A constant value that will be written to the database. For example, if you specify "helloWorld", this is the value that will be written to this parameter.

* You are required to pass only one of the parameters: sourceField or value.

No
apiKeystring the API key of the site from which to read the data. This is used in a site-to-site data transfer scenario.
No
userKeystring The user key credentials for reading data from a Gigya site. This is used in a site-to-site data transfer scenario.
No
secretstring The secret key credentials for reading data from a Gigya site. This is used in a site-to-site data transfer scenario.
No
maxConnectionsinteger10The maximum number of connections that can be opened concurrently. Accepts values between 1 and 100.
Note

All three parameters are required when copying site accounts: apiKey, userKey and secret.

Tip
titleExample

 Following is an example of using the generic writer in a flow that reads data from FTP, and writes to Gigya's Data Store:

Code Block
{
	"id" : "",
	"name" : "Generic Writer",
	"description" : "FTP > uncompress > jsonParse > gigyaDSWrite",
	"steps" : [{
			"id" : "ftpRead",
			"type" : "datasource.read.ftp",
			"params" : {
				"host" : "...",
				"username" : "...",
				"password" : "...",
				"remotePath" : "inbound",
				"fileNameRegex" : "import_500objects.*.gz"
			},
			"next" : ["uncompress"]
		}, {
			"id" : "uncompress",
			"type" : "file.uncompress.gzip",
			"next" : ["jsonParse"]
		}, {
			"id" : "jsonParse",
			"type" : "file.parse.json",
			"next" : ["gigyaGenericWriter"]
		}, {
			"id" : "gigyaGenericWriter",
			"type" : "datasource.write.gigya.generic",
			"params" : {
				"apiMethod" : "ds.store",
				"apiParams" : [{
						"sourceField" : "data",
						"paramName" : "data"
					}, {
						"value" : "cool_type",
						"paramName" : "type"
					}, {
						"value" : "auto",
						"paramName" : "oid"
					}, {
						"value" : "arrayPush",
						"paramName" : "updateBehavior"
					}
				]
			}
		}
	]
}

...

HTML
<script>
$(document).ready(function() {
    lssdk.expands.expandByHash();
});
</script>
 
 

 

 

All three parameters are required when copying site accounts: apiKey, userKey and secret.

stopOnFirstFailure