DEV Community

Jerod Johnson
Jerod Johnson

Posted on

Create an RPA Flow that Connects to Oracle Data in UiPath Studio

If your company uses legacy technology systems, you can use the UiPath RPA platform to extend your process automation capabilities to these systems and eliminate repetitive, error-prone tasks of manually updating them. By using UiPath Studio, you can build an RPA program just like drawing a diagram.

With the CData ODBC Driver for Oracle, users can embed Oracle data in the workflow.

Let’s consider a simple example to illustrate how you can use the Oracle ODBC Driver in UiPath Studio to create an RPA program that accesses Oracle data.

Alt Text

Configure the Connection to Oracle

If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.

To connect to Oracle, you'll first need to update your PATH variable and ensure it contains a folder location that includes the native DLLs. The native DLLs can be found in the lib folder inside the installation directory. Once you've done this, set the following to connect:

  • Port: The port used to connect to the server hosting the Oracle database.

  • User: The user Id provided for authentication with the Oracle database.

  • Password: The password provided for authentication with the Oracle database.

  • Service Name: The service name of the Oracle database.

Connect UiPath Studio to Oracle Data

Now you are ready to use Oracle data ODBC DSN in UiPath Studio with the following steps.

  1. From the Start page, click Blank to create a New Project.

  2. Click Manage Packages then search for and install UiPath.Database.Activities.

  3. Navigate to the Activities and drop a Flowchart (Workflow -> Flowchart -> Flowchart) onto the process.

  4. Drop a database Connect activity (App Integration -> Datbase -> Connect) after the Start activity.

  5. Double-click the Connect activity and configure the Connection.

Alt Text

i. Click the Connection Wizard

ii. Select "Microsoft ODBC Data Source"

iii. In Connection Properties, select your DSN (CData OracleOCI Source) and click OK

  1. To store Connection info, create a variable and bind to Output in the Properties section. Choose DatabaseConnection in Output.

Alt Text

Create an Execute Query Activity

With the connection configured, we are ready to query Oracle data in our RPA.

  1. From the Activities navigation, select Execute Query and drop it on the Flowchart.

  2. Double-click the Execute Query activity and set the properties as follows:

  • ExistingDbConnection: Your Connection variable

  • Sql: SELECT statement like SELECT CompanyName, City FROM Customers WHERE Country = US

  • DataTable: Create and use a variable with the Type System.Data.DataTable

Alt Text

Create Write CSV Activity

With the Connection and Execute Query activities configured, we are ready to add a Write CSV activity to the Flowchart to replicate the Oracle data.

  1. From the Activities navigation, select Write CSV and drop it after the Execute Query activity.

  2. Double-click the Write CSV activity and set the properties as follows:

  • FilePath: Set to a file (new or existing) on disk (i.e.: C:\UiPath[id]-data.csv

  • DataTable: Set to the DataTable variable you created earlier

Connect the Activities and Run the Flowchart

If they are not already connected, connect each Activity that you created to complete the RPA project for extracting Oracle data and exporting it to CSV.

Alt Text

Click Run to extract Oracle data and create a CSV file.

Alt Text

More Information

Many businesses are embracing digital ways of operation as the future belongs to automated routine operations. The two most significant advantages of digitization are speed and accuracy. As a result, the industry sought a quick and dependable solution, which they found in the form of the RPA tool UiPath.

Use the Oracle ODBC Driver to create workflows that access real-time Oracle data without any coding in UiPath Studio.

Discussion (0)