feat(cloudflare/pipelines): Stream, Sink, Pipeline resources#532
Open
sam-goodwin wants to merge 2 commits into
Open
feat(cloudflare/pipelines): Stream, Sink, Pipeline resources#532sam-goodwin wants to merge 2 commits into
sam-goodwin wants to merge 2 commits into
Conversation
Add Effect-native support for Cloudflare Pipelines (open-beta v1 model) plus an `alchemy/Cloudflare/SQL` namespace for schema authoring. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Install the packages built from this commit: alchemy bun add alchemy@https://pkg.ing/alchemy/c024b17@alchemy.run/better-auth bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/c024b17@alchemy.run/pr-package bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/c024b17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Effect-native support for Cloudflare Pipelines (open-beta v1 model):
Streamfor write-only event ingestion,Sinkfor R2 / R2 Data Catalog destinations, andPipelinefor the SQL job that wires them together. Schema authoring lives inalchemy/Cloudflare/SQL(re-exportseffect/Schema+ Cloudflare precision/temporal brand helpers).Define a stream, sink, and pipeline
schemaaccepts a plain record ofSchemavalues — wrapped inSchema.Struct(...)for you:Produce from a Worker
What gets created on
SinkCredentials are derived from the token's outputs (
accessKeyId = tokenId,secretAccessKey = sha256(token.value)forr2;tokenforr2_data_catalog) and carried asRedacted<string>end-to-end.Types Cloudflare distinguishes that
Schema.Number/Schema.Datecan'tBare
Schema.Numbercompiles tofloat64;Schema.Datetotimestamp:millisecond.Schema.Array(x)becomeslist<x>, nestedSchema.Structbecomesstruct,Schema.Unknownbecomesjson. Optional fields (SQL.optional(...)) emitrequired: false.schemaalso accepts aSchema.Struct(...)value or a raw{ fields: [...] }payload as escape hatches.