Database package

Databases support internal operations of an enterprise by storing a variety of data, such as sales transactions, product catalogs, inventories, and customer profiles. Use the Database package to connect to a database, begin a transaction, and manipulate the stored data by retrieving, inserting, updating, deleting, and exporting it to a CSV file.

Before you start

Perform the following actions within the Database package as part of using the set of available actions:
Note: When you use actions such as Read from, Run stored procedure, or Export to data table to retrieve records from a Microsoft SQL Server table which has a bit type column or an Excel column (with TRUE or FALSE values), then the retrieved data will be referred to 0 and 1, not TRUE and FALSE.
  1. Establish a connection with the database server using the Connect action.

    See Using Connect action for database.

  2. Choose from the following:
    • Use the Read from action to retrieve records from the database. See Using the Read from action.
    • If you are automating a task that involves making changes to the database, insert the Begin database transaction action, followed by the actions that automate the changes.

      This action ensures that all records are updated or deleted in their entirety, and prevents accidental updates or deletions of incomplete data if the bot encounters an error during run time.

  3. If you used the Begin database transaction action in this session, insert the End database transaction to commit the changes.
  4. Every set of database actions ends with the Disconnect action to terminate the connection to the database server.
Note: The following functionalities are not supported when you create an API Task using the Database package:
  • When you establish a connection with specific databases such as MySQL, you are required to provide a JDBC driver file from the Control Room, local device, or file variable. The file type input is not supported for API Task. Therefore, you will be unable to connect to MySQL databases. However, you can connect to PostgreSQL, MS SQL, MS Access, and SQLite, as the Database package already includes the JDBC driver jar file.
  • Establishing a connection using the ODBC driver is not supported.
  • Write data in a CSV file using the Read from action, as the file action is not supported for API Tasks.

Database data types

Data types represent the type of value that can be stored in the database table. The following table provides information about the widely used data types in Automation 360. Note that this is not a comprehensive list.
Data type Value
Supported data types Char, Varchar, Nvarchar, Number, Datetime, INT, Float, and Bit
Unsupported data types
  • Binary data types: Binary, BLOB, CLOB, BFILE, and RAW
  • Pointer data types: Cursor and Record pointers

Actions in the Database package

The Database package includes the following actions:

Action Description
Begin database transaction See Begin database transaction action.
End database transaction See End database transaction action.
Connect See Using Connect action for database.

The Snowflake database using the ODBC driver is supported.

Disconnect See Disconnect action.
Read from See Using the Read from action.

The Snowflake database using the ODBC driver is supported.

Run stored procedure See Using the Run stored procedure action.
Export to data table See Using the Export to data table action.

The Snowflake database using the ODBC driver is supported.

Manage stored procedure See Manage stored procedure action.
Insert/Update/Delete See Insert/Update/Delete action.

More resources