Data - SQL

Use Data - SQL to import records from a SQL Server database or MySQL database into a data file. The data file is used in a botflow A file that stores the actions and variables designed to automate tasks. to access the imported records.

Import records:

  • From database tables.
  • From database views (queries).
  • Using custom SQL statements.
Before you start 

Create a Data - SQL connection

To create a Data - SQL connection:

  1. Click Add Item () on the Botflow Pane.
  2. Click Data - SQL.
  3. The SQL Data Wizard window displays.

  4. Select the SQL type from the Type drop-down:
    • SQL - Select to use with a SQL database.
    • MySQL - Select to use with a MySQL database. Requires that MySQL be installed.
  5. In the Server field, do one of the following:
    • Enter the required server name.
    • Click the Expression Builder to build the server name using variable or other token values.
    • For SQL, click the down button to retrieve a list of available SQL Servers.
  6. Check the Port box to enter a port number or accept the default (1433).
  7. Enter a timeout value in the Timeout field or use the up and down buttons to incrementally change the value by one second.
  8. For SQL: Select the authenticate type from the Authentication drop-down:
    • Windows - Uses your Windows log in credentials.
    • SQL - Uses the authentication credentials set for the SQL server.

    For MySQL: Enter the username and password associated with the selected MySQL server.

  9. Click Connect to connect to the SQL database server or MySQL database server and retrieve a list of available databases.
  10. Select an available database from the Database drop-down.
  11. Select the record source from the Records drop-down:
    • Table - Retrieves database table records.
    • SQL - Retrieves database records based on an entered SQL query records statement.
    • View - Retrieves database query view records.
  12. Enter a timeout value in the Timeout field or use the up and down buttons to incrementally change the value by one second.
  13. Select a table, table view, or enter an SQL statement depending on your selection in Records.
  14. Page through the Data Wizard to import the records into a data file and display that data in the Data view in the Botflow Pane.

Data - SQL connection window field and button descriptions

Field or button Description
Type

Select the SQL type:

  • SQL - Select to use with a SQL database.
  • MySQL - Select to use with a MySQL database. Requires that MySQL be installed.
Server

In the Server field, do one of the following:

  • Enter the required server name.
  • Click the Expression Builder to build the server name using variable or other token values.
  • For SQL, click the down button to retrieve a list of available SQL Servers.
Port

Check the Port box to enter a port number or accept the default (1433).

Timeout

Enter a timeout value in the Timeout field or use the up and down buttons to incrementally change the value by one second.

Authentication

For SQL: Select the authenticate type from the Authentication drop-down:

  • Windows - Uses your Windows log in credentials.
  • SQL - Uses the authentication credentials set for the SQL server.
Username Enter the username associated with the selected SQL or MySQL server.
Password Enter the password associated with the selected SQL or MySQL server.
Connect Click Connect to connect to the SQL database server or MySQL database server and retrieve a list of available databases.
Database

Select an available database from the Database drop-down.

Records

Select the record source from the Records drop-down:

  • Table - Retrieves database table records.
  • SQL - Retrieves database records based on an entered SQL query records statement.
  • View - Retrieves database query view records.
Timeout Enter a timeout value in the Timeout field or use the up and down buttons to incrementally change the value by one second.
Table/
Table View/
SQL Statement
Select a table, table view, or enter an SQL statement depending on your selection in Records.
Next/Cancel Click Next to proceed to the next page of the Data Wizard or click Cancel to discard the Data - SQL connection or any changes.