Walkthrough for Bulk Insert

This walkthrough guides you through the steps for loading records using the Bulk API.
Before you can start, make sure you’ve completed the prerequisites required to set up your Ingestion API:
  • Setup Ingestion API connector
  • Create and Deploy Data Stream
  • Configure connected app
  1. Create a CSV file that has a header row matching the fields in the data stream you defined. For example, orders.csv. Each file must not exceed 150 MB.
  2. Request a Data Cloud access token. The access_token property in the token exchange response contains the bearer token to use for the authorization header. The instance_url is the Data Cloud instance where the API is hosted.
  3. To upload the data, first create a job. In this example, we’re upserting Orders data from our ecomm Ingestion API connector. If you’re deleting records, you would use the delete operation instead. You must get a JSON response that includes the job id, with a job state of Open. You’ll need the job id in the next steps.
    Request
    Response
  4. Upload your CSV data. After creating a job, you're ready to upload your data. You provide record data using the CSV file you created earlier. You can submit up to 100 CSV files as part of a job.
    Request
    Response
  5. Upload complete. After you're done submitting data, you can inform Data Cloud that the job is ready for processing by closing the job.
    Request
    Response
  6. Check the job status and results. To get basic status information on a job, such as the overall job state or the number of records processed, use a Get Job Info request. The job state changes from UploadComplete to either JobComplete or Failed after the files have been loaded into the data lake.
    Request
    Response