Export from Gigya to SFTP

Skip to end of metadata
Go to start of metadata

Following is a code sample of a dataflow for exporting data from Gigya to SFTP. 

{
	"name" : "Export from Gigya to SFTP",
	"description" : "account > rename > dsv > gzip > sftp",
	"steps" : [{
			"id" : "account",
			"type" : "datasource.read.gigya.account",
			"params" : {
				"select" : "profile.email,profile.lastName,profile.firstName,profile.gender,profile.birthDay,profile.birthMonth,profile.birthYear,profile.address,profile.zip,profile.city,profile.state,profile.country,profile.phones.number,profile.nickname"
			},
			"next" : ["rename"]
		}, {
			"id" : "rename",
			"type" : "field.rename",
			"params" : {
				"fields" : [{
						"sourceField" : "profile.email",
						"targetField" : "MAIL"
					}, {
						"sourceField" : "profile.lastName",
						"targetField" : "NAME"
					}, {
						"sourceField" : "profile.firstName",
						"targetField" : "FIRSTNAME"
					}, {
						"sourceField" : "profile.gender",
						"targetField" : "GENDER"
					}, {
						"sourceField" : "profile.birthDay",
						"targetField" : "BIRTH_DAY"
					}, {
						"sourceField" : "profile.birthMonth",
						"targetField" : "BIRTH_MONTH"
					}, {
						"sourceField" : "profile.birthYear",
						"targetField" : "BIRTH_YEAR"
					}, {
						"sourceField" : "profile.address",
						"targetField" : "STREET"
					}, {
						"sourceField" : "profile.zip",
						"targetField" : "POSTALCODE"
					}, {
						"sourceField" : "profile.city",
						"targetField" : "CITY"
					}, {
						"sourceField" : "profile.state",
						"targetField" : "PROVINCE"
					}, {
						"sourceField" : "profile.country",
						"targetField" : "COUNTRY"
					}, {
						"sourceField" : "profile.phones",
						"targetField" : "PHONE"
					}, {
						"sourceField" : "profile.nickname",
						"targetField" : "USERNAME"
					}
				]
			},
			"next" : ["remove"]
		}, {
			"id" : "remove",
			"type" : "field.remove",
			"params" : {
				"fields" : ["profile"]
			},
			"next" : ["dsv"]
		}, {
			"id" : "dsv",
			"type" : "file.format.dsv",
			"params" : {
				"fileName" : "GIGYA_TO_SFTP_${now}.csv",
				"columnSeparator" : ",",
				"quoteFields" : true
			},
			"next" : ["gzip"]
		}, {
			"id" : "gzip",
			"type" : "file.compress.gzip",
			"next" : ["sftp"]
		}, {
			"id" : "sftp",
			"type" : "datasource.write.sftp",
			"params" : {
				"host" : "", 
				"username" : "",
				"password" : "",
				"remotePath" : ""
			}
		}
	]
}

 
  • No labels