The RSD Generator allows users to automatically generate a custom REST Service Descriptor (RSD) file for a specified table. This RSD file can then be used with an API Query component to load data from a third party into a table (if database access is allowed via a RESTful API).
Generating an RSD File
In Matillion ETL, on the top left of the screen, click Project → Manage API Profiles.
In the Manage API Profiles pop-up window, click ⚙ next to the profile to be edited.
To create a new profile, click + in the bottom left of the window. This will open the Add API Profile pop-up window. From here, enter a name for the new profile in the field provided and click OK.
This will open the Configure API Profile pop-up window. In the top left of the window, click Generate at the bottom of the Files list.
In the Generate RSD Dialog pop-up window, provide details for the following fields:
- Table Name – provide a name for the table
- Description – provide a description for the table
- XPath to Repeat Element – provide the endpoint that will expose repeating elements
- Data format – select the data format of the repeating elements
- URI – provide the endpoint URI with the file extension
Next, click + in the bottom left of the window to add any additional API parameters that might be rquired. Then, click OK.
- Table Name – TicketData
- Description – Ticket data taken from Zendesk
- XPath to Repeat Element – /tickets
- Data Format – JSON
- URI – https://matilliondevelopment.zendesk.com/api/v2/tickets.json
- Parameters – AuthScheme=BASIC; Userfirstname.lastname@example.org; Password=mypassword;
If all inputs are entered successfully, the new RSD file will be saved and listed under Files in the Configure API Profile pop-up window and, if selected, the file text in an iframe. The API parameters will also be listed under Parameters. This file will now be available to use when editing the Profile property of an API Query component.
Generating an RSD File using Static Files
The RSD Generator can also be pointed at static files (for example: the URI property can be pointed at an XML file sitting on a public S3, instead of expecting one to be returned from an API call). This method is recommended as it allows users to construct API calls utilising a preferred API tool. This can be particularly useful if API calls have an extensive list of parameters to enter, or a POST method is used instead of GET.
Once an RSD file is generated using a static file, additional structures can be then created and necessary parts (such as the URI) can be edited.