Introduction
If you are using Fivetran’s supported cloud functions , find out how you can pass additional configuration data to customize your function.
Recommendation
In the example request format, you will see that there exists a ` secrets` root node in the JSON object.
You can supply additional fixed data to that node in the Fivetran Cloud Function connector setup. Fivetran will persist this payload on every request to the function, allowing you to use that data to further configure your function.
Configure `secrets` in the Fivetran dashboard specific to your cloud function connector setup; e.g. the example below for AWS Lambda
Example request:
{
"agent" : "<function_connector_name>/<external_id>/<schema>" ,
"state" : {
"cursor" : "2018-01-01T00:00:00Z"
},
"secrets" : {
"apiToken" : "abcdefghijklmnopqrstuvwxyz_0123456789",
"configurationData": { ... input JSON data here ... }
...
"username": "testUsername",
"password": "testPassword"
...
}
}
Considerations
If you run into any unexpected behavior, please let your Solution Architect know.