May 2021

SQL Statements and Custom Queries in Export Packages

This month, we are excited to announce a new feature available in export packages. From now on, Skyvia users can query data in export packages and run them on schedule. It will greatly simplify the work when you need to create a custom query, formatting the data the way you need, in a source and automatically export the queried results as CSV to your PC or an FTP site.

Export Package Improvements

We have developed a new mode for export packages — Advanced mode. This mode is available when the new data integration runtime is selected. You need to select the Use new runtime checkbox in your export package before adding a task.

In the Advanced task editor mode, you can choose what action to use — either type and edit SQL statement of any complexity on your own (Execute Command) or create custom queries by means of our visual query builder (Execute Query). The new mode is going to be equally convenient for both SQL professionals and SQL beginners. Moreover, we have tried to make the advanced mode design as ergonomic and user-friendly as possible.

Advanced Mode

What Benefits New Functionality Brings

There are several benefits Skyvia offers for users in the new export package functionality.

Before when you selected a table for export from the database of cloud app, the resulting CSV file had the column order as in the source. Now you have a better opportunity, you can influence the column order you receive in the CSV file. In the advanced mode, the generated CSV file will have the same column order as you personally define in the Query Builder or SQL statement.

Moreover, you can rename table columns if necessary. For this, you need to add aliases when entering SQL statements or select a column you’ve added to the Results pane of the Query Builder and edit the column name by clicking the corresponding icon on the right.

It is also worth mentioning that now you can create a query that will use aggregation function to group data by any required column. For this, in the Query Editor, you simply add aggregation function to the column in the SELECT clause and create a GROUP BY clause with all other unaggregated columns.

SQL Statement

Please note that Skyvia supports only SQL SELECT statements in Export packages. Read our updated documentation to find out more about the new feauture.