How to Create Export Task

After you opened an export package details page either for an existing package or a new one, click the Add new link to open the Task Editor. Note that the package should have a valid source connection before creating or editing tasks. You should also make sure which mode you want to use in the task editor.

Skyvia offers two task editor modes for export packages — Simple and Advanced.

Export Package General View

The advanced task editor mode allows querying data, using the Execute Command or Execute Query actions. You can enter the required SQL statements on your own or use our visual query builder tool to compose them in a simplier way.

Simple Task Editor Mode

After you click the Add new link, the task editor opens. The simple task editor mode is used in export packages by default. To configure a task, perform the following steps:

  1. Select the exported object from the Object drop-down list.

  2. All fields of the main object are selected by default. Below deselect checkboxes next to fields you do not want to export data from. Please note you can use the Type to filter box to quickly find the necessary field names.

    Object and Column Lists

    Note that the list contains not only the selected object’s fields, but also the fields of the objects, the selected object refers to, grouped by the object they belong to. You can expand and collapse the object field lists by clicking the corresponding object name. The checkbox to the left of object name allows you to select all the fields of the object (in our case it is “Account”).

    Thus, you can export fields not only of the main object but also the fields of the referenced objects.

    Object Field List

  3. Optionally specify the target CSV file name in the Target File Name box. By default, the CSV file will have the source object name, followed by export operation timestamp if the Append timestamp to the file name checkbox is selected for the package. Note that if you specify a custom name, it will not be followed by the timestamp even if this checkbox is selected for the package; this checkbox is applied only for export tasks with the default file name.

  4. Optionally, you can select the Compress Type for your file — zip or gzip. By default none compress type is selected.

    Target File Name

  5. Specify the filter conditions if necessary (see how).
  6. Specify how the data must be ordered if necessary. For this, click the Add button on the right.

    1. In the first drop-down box, select the name of the exported object or a reference to a related object to sort data by its field.

      Order By drop-down box

    2. In the second drop-down box, select the name of the field to sort the data by.

      Field Name drop-down box

    3. In the third drop-down box, select the sorting order — Asc (ascending) or Desc (descending). If you want to remove inserted data, click Remove.

      Sorting Order drop-down box

  7. Optionally, click the Next step button and edit the names and order of the result CSV columns.
  8. Click the Save button at the bottom of the Task Editor to add the created task to the package.

Column Names

To edit CSV column names, you simply click the default column name you want to change and enter a new name in the box.

Changing Column Names

By default, column names are taken from the data source metadata . Names of the main selected columns are added as they are in the data source. If you add fields from the related objects, the name of result columns are prefixed with the relation name.

Column Order

To change the column order in the result CSV file, drag columns up or down, using the move handle on the left side of the column.

Changing Column Order

Default column order is determined by the order of selecting checkboxes of the columns for export.

Resetting Column Names and Order

If you need to return default column names or default column order, click the Actions drop-down menu on the right of the task editor and select the necessary option.

Actions menu

Advanced Task Editor Mode

Click the Add new link to open the task editor.

Please note that Simple mode is selected by default in the task editor. To switch to the advanced mode, click Advanced under Editor Mode and select one of two possible actions. Currently, Skyvia offers the Execute Command and Execute Query actions to users. However, more actions are expected in future.

Task Editor Advanced Mode

Entering SQL Statements via Command Text

Please note that Skyvia supports only SQL SELECT statements in export packages. When you select an Execute Command action, you type and edit your SQL statement directly in the Command Text box. For example, to select and export Mailchimp lists with the number of subscribed and unsubscribed members, you enter the SELECT statement as on the screenshot below.

Advanced Task Editor Mode

You can also check public queries via the General Gallery in your Skyvia account. Public queries are predefined templates, which contain most common query samples. You can copy the predefined query if the one you need is available in the Gallery and paste it directly into the Command Text box and edit the way you need (if necessary). To find predefined queries, click the +NEW button in the top menu and switch to Gallery. Read more about it here.

Additionally, you may click the Open in Editor link if you need to open the command in the Query Editor. The Query Editor has the Connection Object List on the left, in which you can browse connection objects and view connection metadata in order to enter table and column names without errors in your commands. To see the fields (columns), the query returns, you can click Preview in the bottom left corner of the query editor.

Query Editor

If you need to add additional parameters, click Edit icon next in the Parameters section to open the Mapping Editor. In the Mapping Editor, you can add/delete parameters, rename them, and map them using Skyvia expressions. You can read more about the Mapping Editor and how to work with it in the Mapping Editor topic.

Mapping Editor

Before saving the task, you need to specify the target file name in the Target File Name box, otherwise the task will not be saved. Then create a package and run it.

Creating Queries with Visual Query Builder

You can compose SELECT queries visually with our convenient query builder without typing a code. That is a good option if you are not much familiar with SQL. When you select an Execute Query action, the Query Model box appears. Click Open Query Builder to open and work in the Query Editor.

Execute Query action

Query Editor allows viewing connection metadata. The Connection Object list to the left of the query editor displays the information on the metadata of available objects/tables from the source connection. You can drag a necessary table from the Connection Object List to the Result Fields pane to query its data (add it to the SELECT and FROM clauses of the SELECT statement). The Result Fields pane displays fields (columns) the query returns. By clicking a certain table, you can open and view the list of its fields.

Query Editor - Account

To filter data by certain columns (i.e. to add them to the WHERE clause of the query), drag these columns from the Connection Object list to the Filters pane. Filters pane displays query filters and filter groups. Please note that query filters are type-specific, the available filters depend on the data type of the column. For example, if you need to filter Salesforce accounts by the CreatedDate column within a certain period, you simply drag the column to the Filters pane and select value to compare the field with (like equal to or between) in the Filter list on the right.

Value filters simply compare the field value with the specified one using different comparison operators or check whether the field value is NULL. Value filters are supported for all field types.

Skyvia also offers list filters and relative filters. List filters are supported for fields with string data only. Relative filters are supported for the fields with datetime data only.

Query Editor - Filters

You can read more about the Query Builder and how to configure queries in the Query section of our documentation.