Loading CSV Data into StarRocks from Local Disk or from S3 Bucket #22783
Closed
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This tutorial describes how you can loading CSV data using the "routine load" feature.
Prerequisites
For this tutorial you need to:
A StarRocks or CelerData database cluster
This is out of scope for the tutorial.
Create the Sample CSV Data File
Create a
example.csv
file with the following dataAccess to an Object Store and upload the CSV data file
This is out of scope for the tutorial. Please store the URI to the file and any credential needed to login for future usage.
Create a Database and Create a Database Table
Output should look like:
Load the CSV file using HTTP
Here's how the output would look:
Load the CSV file using broker
Here's an example of the sql statements needed. You'll need an environment with the broker in it. In situations with docker, you may need to copy the file into the container using
docker cp
.Load the single record using HTTP
Here's how the output would look:
Load the data from S3
Since you need an S3 bucket, you can either host one locally using software like Minio (#22782) or you can use a cloud service like AWS S3.
Here is the output:
More information at https://docs.starrocks.io/en-us/latest/loading/StreamLoad
Beta Was this translation helpful? Give feedback.
All reactions