...
The Select Row(s) from Table activity parameters can be provided by manual inserted values or via IN arguments or variables:
Parameters:
- Distinct (combo box control) (type: string): whether the returned values should be distinct or not.
- Fields (text box editor type) (type: string): the column headers that you want to be returned with the select command. If you enter more than one you should separate them with ','. If all fields needs to be returned, then just use "*". The " * " has the same role as used in the SQL select all statement: select * from table
- Limit (text box editor type) (type: string): limit the number of results. Order By (text box editor typeIf the field is left blank, then the activity will return all the rows from the table
- Order By (text box editor type) (type: string): the column header that you want to result to be ordered by.
- Order by Direction (combo box control) (type: string): choose to order the resulted rows in ASC or DESC direction. It will be ignored if Order By is not set.
- Table (text box editor typeFor example, if "ID" is inserted, then the values returned will be ordered depending on the value set in the ID column. If no value is provided, the activity will return the values in the same order as taken from the table.
- Order by Direction (combo box control) (type: string): the table name on which to choose to order the resulted rows in Ascending or Descending direction. It will be ignored if Order By is not set.
- Table (text box editor type) (type: string): the table name on which to run the select.
- WHERE (text box editor type) (type: string): the Where statement. For example: ID>2, where ID is a column header.
As mentioned above, the values for all the required parameters can be provided by IN arguments or variables. Below is an example of predefined arguments, ready to be used by the Select Row(s) from Table activity:
...
The Read Only Output variable are the possible output values that the activity will provide:
- Output (type: collection<collection<string>>): outputs a collection of collections of strings containing the selected rows.To use the elements of the collection, use Get Element From Collection activity.
- Output Columns (type: int32): outputs the number of columns returned.
- Output Rows (type: int32): outputs the number of rows returned.
A more complex example, with fields, orders and statements can be seen in the image below:
Execution: In the Tracking Data there can be seen the returned results:
The same result can be seen when executing the same SQL Select query from PHPMyAdmin:
Export from Database
This activity exports data from a Database into an XML or a CSV file.
Activity Parameters
The Export from Database activity parameters can be provided by manual inserted values or via IN arguments or variables:
Parameters:
- Destination Path (combo box control) (type: string): the path where the export (csv or xml) file will be created.
- File Name (text box editor type) (type: string): the name of the XML file or CSV file that will be created. E.g. 'MySQLTableExport'.
- File Type (combo box control) (type: string): the type of the file that will be created. For each of them a different set of parameters will be displayed.
- Overwrite (combo box control) (type: string): whether to overwrite the file if it already exists.
- Root Name (text box editor type) (type: string): the name of the root for the .xml file. This field should be completed only when XML is selected in the File Type field. As syntax, for example, xml_root can be used.
- Table (text box editor type) (type: string): the table(s) from where the export will be made (accepts multiple values separated by comma).
The Read Only Output variable are the possible output values that the activity will provide:
- Output (type: boolean): outputs True or False if the execution was successful or not.
Execution: the activity will create an export file of the table(s) settled in the Table field, in the specified folder:
Import into Database
This activity imports data into a Database from an XML or a CSV file.
Activity Parameters
The Import into Database activity parameters can be provided by manual inserted values or via IN arguments or variables:
Parameters:
- File Type (combo box control) (type: string): the type of the file that will be imported from. For each of them a different set of parameters will be displayed.
- First Row Header (combo box control) (type: string): whether the CSV file includes the header as a first row or not.
- Import File Path (text box editor type) (type: string): the path where the file will be selected from, or choose it with the file browser.
- Table (text box editor type) (type: string): the table name where the file will be imported. If left empty it will take the 'Name' of the CSV File or the 'Root Name' from the XML File.
As mentioned above, the values for all the required parameters can be provided by IN arguments or variables. Below is an example of predefined arguments, ready to be used by the Import into Database activity:
The Read Only Output variable are the possible output values that the activity will provide:
- Output (type: boolean): outputs True or False if the execution was successful or not.