Spark Load
Apache Doris Spark Load preprocesses data in an external Spark environment and sends the resulting files through a storage-coupled loading path. The upstream procedure is experimental and explicitly requires integrated storage and compute. That procedure does not apply to the managed, storage-compute-separated architecture of VeloDB Cloud.
Do not install the Spark Load client, deploy a Broker, or configure warehouse FE and BE hosts using the upstream procedure. Spark Load is different from the Spark Doris Connector, which is a client-side integration for reading and writing warehouse tables.
Choose a loading path
| Your source or workflow | Loading path |
|---|---|
| A Spark DataFrame or an existing Spark pipeline | Use the Spark Doris Connector in your Spark environment. Check its Spark, Scala, Java, and connector compatibility requirements. |
| Files already exported to object storage | Use Broker Load for asynchronous SQL loading, or INSERT INTO SELECT to query and transform files through a table-valued function. |
| Files on your client computer | Use Stream Load, or the local file upload workflow when its SaaS file-size and format requirements fit. |
| Data accessible through an external catalog | Query the external tables, then use INSERT INTO SELECT to copy the required rows into warehouse tables. |
The Spark application runs in your environment. VeloDB Cloud does not provision a Spark cluster for this workflow. A connector's upstream compatibility table is not proof that every connector release or deployment path has been tested with your warehouse.
Prepare a Spark ingestion workflow
- Choose the connector or export-and-load path from the table above.
- Prepare the target database and table, including the table model, keys, column types, and required warehouse SQL privileges.
- Copy the warehouse connection details from Connect in the VeloDB Cloud console. Retain the generated TLS settings and use the required network path. See Connection Methods.
- Verify connectivity from the Spark driver and executors to the warehouse hosts and ports required by the selected connector. For an exported-file load, also verify warehouse access to the object storage or filesystem.
- Run a small representative batch. Inspect the connector or load result, compare row counts, and query representative rows before scaling up.
For a guide to the available loading methods, see Load Overview.
Common errors
| Symptom | What to check |
|---|---|
| The connector fails to load or reports missing classes. | Match the connector artifact to the Spark, Scala, and Java versions, and make it available to the driver and executors. |
| A connection times out or an HTTP redirect fails. | Use the generated warehouse endpoints and allow the required hosts and ports from the Spark environment. |
| Authentication or authorization fails. | Check the warehouse SQL credentials, target table privileges, and cluster access. Source storage credentials are separate. |
| A batch reports filtered rows. | Compare the source and target schemas, parsing options, and nullability. Filter tolerance can intentionally discard rows. |
| The upstream Spark Load client requires managed-host changes. | Choose the connector or file-loading path above. Contact VeloDB Cloud support if a required integration remains unclear. |
Cost and cleanup
Your external Spark environment and VeloDB Cloud warehouse can both incur charges. Exported intermediate files can also consume storage and transfer bandwidth. See Billing.
Retain source or exported data until you have verified the load. Then stop test Spark jobs, remove temporary export files when safe, and remove test warehouse tables that you no longer need.