Skip to content

Commit 2fcd519

Browse files
committed
Improved getting started guide
1 parent 09646a4 commit 2fcd519

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/content/docs/pipelines/getting-started.mdx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ head:
1010

1111
import { Render, PackageManagers } from "~/components";
1212

13-
Cloudflare Pipelines allows you to ingest and load high volumes of real time streaming data into [R2 Object Storage](/r2/), without managing any infrastructure. This guide will show you how to setup a Pipeline which accepts data via HTTP.
13+
Cloudflare Pipelines allows you to ingest and load high volumes of real time streaming data into [R2 Object Storage](/r2/), without managing any infrastructure.
1414

1515
By following this guide, you will:
16-
1. Create your first Pipeline.
17-
2. Connect it to your R2 bucket.
18-
3. Post data to it via HTTP.
19-
4. Verify the output file written to R2.
16+
1. Setup an R2 bucket
17+
2. Create a pipeline, with HTTP as a source, and an R2 bucket as a sink
18+
3. Send data to your pipeline's HTTP ingestion endpoint
19+
4. Verify the output delivered to R2
2020

2121
:::note
2222

@@ -34,50 +34,50 @@ To use Pipelines, you will need:
3434

3535
## 1. Set up an R2 bucket
3636

37-
Pipelines let you ingest records in real time, and load them into an R2 bucket. Create a bucket by following the [get started guide for R2](/r2/get-started/), or by running the command below:
37+
Create a bucket by following the [get started guide for R2](/r2/get-started/), or by running the command below:
3838

3939
```sh
40-
npx wrangler r2 bucket create [R2-BUCKET-NAME]
40+
npx wrangler r2 bucket create clickstream-bucket
4141
```
4242

4343
Save the bucket name for the next step.
4444

4545
## 2. Create a Pipeline
4646

47-
To create a Pipeline using Wrangler, run the following command in a terminal, and specify:
47+
To create a pipeline using Wrangler, run the following command in a terminal, and specify:
4848

49-
- The name of your Pipeline
49+
- The name of your pipeline
5050
- The name of the R2 bucket you created in step 1
5151

5252
```sh
53-
npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME] --batch-max-seconds 5 --compression none
53+
npx wrangler pipelines create clickstream-pipeline --r2-bucket clickstream-bucket --batch-max-seconds 5 --compression none
5454
```
5555

56-
After running this command, you'll be prompted to authorize Cloudflare Workers Pipelines to create R2 API tokens on your behalf. These tokens are required by your Pipeline. Your Pipeline uses the tokens when loading data into your bucket. You can approve the request through the browser link which will open automatically.
56+
After running this command, you'll be prompted to authorize Cloudflare Workers Pipelines to create an R2 API token on your behalf. These tokens used by your pipeline when loading data into your bucket. You can approve the request through the browser link which will open automatically.
5757

58-
If you prefer not to authenticate this way, you may pass your [R2 API Tokens](/r2/api/s3/tokens/) to Wrangler:
58+
If you prefer not to authenticate this way, you may pass your [R2 API Token](/r2/api/s3/tokens/) to Wrangler:
5959
```sh
60-
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --r2-access-key-id [ACCESS-KEY-ID] --r2-secret-access-key [SECRET-ACCESS-KEY]
60+
npx wrangler pipelines create clickstream-pipeline --r2-bucket clickstream-bucket --r2-access-key-id [ACCESS-KEY-ID] --r2-secret-access-key [SECRET-ACCESS-KEY] --batch-max-seconds 5 --compression none
6161
```
6262

63-
When choosing a name for your Pipeline:
63+
When choosing a name for your pipeline:
6464

65-
1. Ensure it is descriptive and relevant to the type of events you intend to ingest. You cannot change the name of the Pipeline after creating it.
65+
1. Ensure it is descriptive and relevant to the type of events you intend to ingest. You cannot change the name of the pipeline after creating it.
6666
2. Pipeline names must be between 1 and 63 characters long.
6767
3. The name cannot contain special characters outside dashes (`-`).
6868
4. The name must start and end with a letter or a number.
6969

70-
You'll notice that we have set two optional flags while creating the pipeline: `--batch-max-seconds` and `--compression`. We've added these flags to make it faster for you to see the output of your first Pipeline. For production use cases, we recommend keeping the default settings.
70+
You'll notice that we have set two optional flags while creating the pipeline: `--batch-max-seconds` and `--compression`. We've added these flags to make it faster for you to see the output of your first pipeline. For production use cases, we recommend keeping the default settings.
7171

72-
Once you create your Pipeline, you will receive a HTTP endpoint which you can post data to. You should see output as shown below:
72+
Once you create your pipeline, you will receive a HTTP endpoint which you can post data to. You should see output as shown below:
7373

7474
```sh
75-
🌀 Authorizing R2 bucket "[R2-BUCKET-NAME]"
76-
🌀 Creating pipeline named "[PIPELINE-NAME]"
77-
✅ Successfully created pipeline [PIPELINE-NAME] with ID [PIPELINE-ID]
75+
🌀 Authorizing R2 bucket "clickstream-bucket"
76+
🌀 Creating pipeline named "clickstream-pipeline"
77+
✅ Successfully created pipeline clickstream-pipeline with ID 91f312b8ca484e5db404bd3e3ef256fn
7878

7979
You can now send data to your pipeline with:
80-
curl "https://<PIPELINE-ID>.pipelines.cloudflare.com/" -d '[{ "foo":"bar }]'
80+
curl "https://91f312b8ca484e5db404bd3e3ef256fn.pipelines.cloudflare.com/" -d '[{ "foo":"bar }]'
8181
```
8282

8383
## 3. Post data to your pipeline
@@ -86,11 +86,11 @@ Use a curl command in your terminal to post an array of JSON objects to the endp
8686

8787
```sh
8888
curl -H "Content-Type:application/json" \
89-
-d '[{"account_id":"test", "other_data": "test"},{"account_id":"test","other_data": "test2"}]' \
89+
-d '[{"event":"viewedCart", "timestamp": "2025-04-03T15:42:30Z"},{"event":"cartAbandoned", "timestamp": "2025-04-03T15:42:37Z"}]' \
9090
<HTTP-endpoint>
9191
```
9292

93-
Once the Pipeline successfully accepts the data, you will receive a success message.
93+
Once the pipeline successfully accepts the data, you will receive a success message.
9494

9595
Pipelines handle batching the data, so you can continue posting data to the Pipeline. Once a batch is filled up, the data will be partitioned by date, and written to your R2 bucket.
9696

0 commit comments

Comments
 (0)