Advanced
Checkpoint 7 — the bulk loader
You should now be able to batch DML with array binds, ingest at max speed with direct path, and administer the instance.
The exercise — bulkload
A CSV importer for employees with two engines:
--mode=array— parse CSV intoOCI_Int32/otext/OCI_Doublearrays,OCI_StatementBind*Array,BindArraySetSize, oneExecute, oneCommit.--mode=dirpath—TypeInfoGet(employees)→DirPathCreate→SetColumnper column →Prepare→SetEntryloop →Convert/Load→Finish.
Add flags: --rows N, --no-log (DirPathSetNoLog), --onerror continue
(report GetErrorRow/GetErrorColumn and keep going).
Measure & compare
- Rows/sec for 10k/100k/1M rows in both modes.
- Insert a duplicate
empno— how does each mode surface the failing row? - Time
Commitbehavior differences (array = per-execute, dirpath = atFinish).
Acceptance checks
- Row counts match CSV line count in both modes.
- Bad rows are reported with correct index.
GetAffectedRows/GetRowCountagree with the file.
What it exercises
| Skill | Pages |
|---|---|
| Array binds | 810 |
| DirectPath cycle + errors | 815 |
| Error handling | 080 |
| Prepared executes | 260 |
Part 8 done. Final stretch: Part 9 — sharding, SODA, capstone.