Bulk Insert to an External Database
  • 17 Nov 2021
  • 1 Minute to read
  • Dark
    Light

Bulk Insert to an External Database

  • Dark
    Light

Article summary

Overview 

In the event that a user wishes to update an External Database Table by adding Objects to it, they may utilize the Bulk Insert to [Database Table Name] step. 

This step operates similarly to how the standard Batch Insert Entities step in that it allows users to add Objects of a specific DataType that are either mapped from another source or mapped directly on the step via Constant mapping, to a Database.

 However, this step can only be used to insert to a specific External Database Table that has the Insert Property enabled on it. The following document demonstrates how to enable the Insert Property and how to use the Bulk Insert to [Database Table Name] step to update an External Database Table via Flow. 


Enabling Insert 

To use the Bulk Insert step for a specific External Database Table, the Insert Property must first be enabled on the Table. To do so either enable it from the Define Flow Steps window upon adding the Table Integration or:

Additional Resources 
The following example uses an External Database Integration, for information on how to properly establish such an Integration, see External Database Integration

  1. From the Decisions Studio, navigate to System > Integrations > Databases [NAME OF DATABASE]
  2. Right-click the desired Table, then click Edit Table
  3. Click NEXT through each window until the Define Flow Steps window appears. 
  4. Under Define Flow Steps, check the Insert Boolean
  5. Click SAVE to save the changes and close the window. 

Example 

To use the Bulk Insert to step to add Objects (in this case Accounts) to an External Database


  1. From a Designer Project, select CREATE FLOW, then CREATE a new Flow
  2. From the Flow Designer, in the Toolbox tab, navigate to Integration > DATABASE > [NAME OF DATABASE] > [NAME OF DATABASE TABLE], and attach a Bulk insert to [Database Name] step to the Start step. 
  3. Connect both the Failed and Inserted paths to the End step. 
  4. From the Properties tab of the Bulk Insert to step, under INPUTS > Inserted Objects, set the mapping to Constant. Then click ADD. 
  5. From the Add Value window, define the Object as needed/desired, then click OK. 
  6. Repeat the process as needed. 
  7. Save the Flow, then Debug it from the Flow Designer, or Run it from the Designer Project. 

Was this article helpful?

What's Next