Bulk-insert: options to define dynamic values - same as regular database insert

Hello,

In one of my projects, while integrating a CSV import functionality, I decided to explore the option of using bulk-insert Server-side API option. The bulk-insert option works as intended, however, I soon hit a limitation in its usage.

The bulk-insert option only lets you choose static values, while a regular database insert lets you pick values that can change.

Would it be possible to make the bulk-insert option so you can also pick dynamic values? Maybe there’s already a way to use fields that are calculated on the fly in bulk-insert that I'm not aware of.

Here’s a quick comparison of both API steps: the bulk-insert option (which only has a drop-down) and the normal database insert (which has a dynamic picker).

Use the Repeat step to add dynamic fields/values. Then the repeat step would be the source for the bulk insert.

Hi @Quy ,

Thanks for the suggestion to use the Repeat step. Could you please include a screenshot of the steps?

Use Set Value step to use dynamic binding.

These values will now be available in the Database Bulk Insert step

Thanks, Quy.

I think if the ‘bulk insert’ step is inside the repeat, it will act like a standard database insert.

However, the ‘bulk insert’ step doesn’t need a repeat. If you take it out of the repeat, you won’t be able to calculate dynamic values like you would with a regular database insert.

The bulk insert step is after the repeat step.

Basically using the repeat step to build the array with additional columns to be used as the source for the bulk insert step.

Oh, sorry, my mistake.

I tried this setup and I didn't see any list of set values from the repeat step to use in the bulk insert. Not sure why is that the case.

I'm importing a CSV file, is that the reason for it to behave differently to your setup?

Make sure Output is enabled for these steps. In the Database Bulk Insert screen, click on the Refresh icon. Sometimes it appears automatically, otherwise, you have to refresh manually.