Export SQL Server data as XML to SFTP on schedule
Utilities
What it does
When a scheduled interval arrives, this automation queries SQL Server and transforms the data into XML format. It uploads the file to SFTP and tracks it in a lookup table to prevent duplicates.
Who it's for
Data and analytics teams who need to regularly export SQL Server data to SFTP without manual file creation.
Apps used
How teams use this
Export daily SQL Server snapshots to SFTP
Run the export every morning at a set time so the SFTP server always has the latest SQL Server data in XML format. The lookup table prevents the same file from being sent twice.
Route exports to different SFTP folders
Change the SFTP destination path based on the data type or date so exports are organized by folder. The automation logic stays the same.
Add data validation before upload
Include a condition to check that the XML file meets size or schema requirements before uploading to SFTP. Only valid files are sent and tracked in the lookup table.
How it works
- Run on a specified interval. This automation starts at the scheduled time you set, such as daily or weekly, and begins the export process.
- Transform data into XML format. Execute custom Ruby code to convert the SQL Server data into XML content that matches your file structure and requirements.
- Upload file to SFTP server. Send the formatted XML file to your SFTP server at the designated folder path so it is available for downstream systems.
- Track the file in a lookup table. Record the file entry in the xml_files lookup table so this automation knows which files have been uploaded and avoids sending duplicates.