Database Bulk Insert — Reference
Map a collection of source records into database inserts.
Map a collection of source records into database inserts.
Before you begin
Section titled “Before you begin”- A working database connection and a disposable test table or records. Validate inputs and enforce access before private reads or writes.
Database Bulk Insert
Section titled “Database Bulk Insert”Map a collection of source records into database inserts.
Settings
Section titled “Settings”| Setting | Meaning |
|---|---|
| Name | The step name used by later server expressions and named action output. For example, a query named products is available to subsequent steps as products. |
| Output | Includes the named result in the action response. The result can be used by later server steps when Output is off. Several rules initialize Output on although their declared default is false; inspect the saved action. |
| Connection | The database connection definition to use. It must be available and correctly configured for the active target. |
| Source | An array of record objects to insert. It is not the destination table or a page repeat. |
| Batch Size | The positive chunk size used by the Node.js bulk-insert loop; default 100. The installed PHP loop does not apply this setting as chunking. |
| Bulk Insert Options | Select the target table and map destination columns to source-record fields. Check missing/null values and data types before processing the full source. |
Worked example
Section titled “Worked example”Use two test records with name and price fields. Select the destination products table and map each destination column to the corresponding source field. Run the action, compare the affected result with the source count, and verify both stored rows.
Result and safety boundaries
Section titled “Result and safety boundaries”Use a positive Batch Size. Node.js inserts chunks within a transaction; the installed PHP implementation iterates a prepared statement and does not use Batch Size in the same way. A field mapping names the source field to copy; it is not an implicit arbitrary per-record expression. Validate the complete collection before writing.
Use the database workflow
Section titled “Use the database workflow”Use Database Manager to define and inspect the underlying tables. Use Server Connect to control the data returned to the page, and verify the actual response shape before choosing an App Connect binding.
Check your result
Section titled “Check your result”You can configure the intended query/write scope and verify its result shape or database effect.