---
title: "TypeScript SDK: connectors and sinks"
excerpt: "Define S3, GCS, and Kafka connections and sink pipes in TypeScript. Plus a simpler deploy workflow and Playground improvements."
date: "2026-02-20"
---

In case you missed it, [Tinybird now has a TypeScript SDK](https://www.tinybird.co/blog/tinybird-now-in-typescript). Define your Data Sources, Pipes, connectors, and sinks as TypeScript code with full type safety.

# TypeScript SDK: connectors and sinks

The [TypeScript SDK](https://github.com/tinybirdco/tinybird-sdk-typescript/tree/main/src) now supports S3, GCS, and Kafka connectors, plus sink pipes. You can define your entire data pipeline in TypeScript, from ingestion to output.

**S3 and GCS connectors**: Define connections with `defineS3Connection` and `defineGCSConnection`, then reference them from your Data Sources:

```typescript
import { defineS3Connection, defineDatasource, t, engine } from "@tinybirdco/sdk";

export const landingS3 = defineS3Connection("landing_s3", {
  region: "us-east-1",
  arn: "arn:aws:iam::123456789012:role/tinybird-s3-access",
});

export const s3Events = defineDatasource("s3_events", {
  schema: {
    timestamp: t.dateTime(),
    event: t.string(),
  },
  engine: engine.mergeTree({ sortingKey: ["timestamp"] }),
  s3: {
    connection: landingS3,
    bucketUri: "s3://my-bucket/events/*.csv",
    schedule: "@auto",
  },
});
```

**Sink pipes**: `defineSinkPipe` sends query results to external Kafka or S3 destinations:

```typescript
import { defineSinkPipe, node } from "@tinybirdco/sdk";
import { landingS3 } from "./connections";

export const s3Export = defineSinkPipe("s3_export", {
  sink: {
    connection: landingS3,
    bucketUri: "s3://my-bucket/exports/",
    fileTemplate: "events_{date}",
    format: "csv",
    schedule: "0 * * * *",
  },
  nodes: [node("export_query", "SELECT * FROM s3_events WHERE timestamp > now() - INTERVAL 1 HOUR")],
});
```

**Migration improvements**: `tb migrate` now handles more pipe syntax, keyword parameters, `tb_secret()` templates, and `jsonPath` modifiers. If you have existing `.datasource` and `.pipe` files, the migration to TypeScript is more complete.

**Simpler client creation**: The SDK now exports a `Tinybird` class. Use `new Tinybird(...)` instead of the old `createTinybirdClient()` function.

**Deploy**: The SDK's `deploy` command now uses the server-side auto-promote flow, matching the Python CLI. Deploy error messages no longer reference the Python CLI's `--allow-destructive-operations` flag.

## TypeScript SDK quickstart in onboarding

New Workspaces now offer a TypeScript SDK onboarding path. Choose "Set up the TypeScript SDK" to get a guided setup with a prompt you can paste into your AI coding agent, plus your Workspace credentials ready to copy.

{% image src="/assets/changelog/ts-sdk-onboarding.png" alt="TypeScript SDK onboarding flow showing a prompt for AI coding agents and Workspace credentials" /%}

## Playground improvements

**Full screen mode**: Playground nodes now support full screen for more space when writing SQL or reviewing results.

**Tab autocomplete**: Tab key now correctly accepts autocomplete suggestions in the Playground SQL editor. Previously, pressing Tab while the dropdown was open didn't insert the selected suggestion.

**Parameter persistence**: Parameter values are now preserved when switching between Playground tabs. Previously, values could reset to defaults when the tab regained focus.

**Node validation**: Node updates now validate that required fields (name and SQL) are present before saving, preventing empty nodes from being created.

## CLI 3.5.2

Requires upgrading to [tinybird 3.5.2](https://pypi.org/project/tinybird/).

`tb deploy --auto` now uses server-side auto-promote. Instead of polling for status and calling set-live separately, the CLI sends `auto_promote=true` to the API and waits for the deployment to go live. The deployment shows progress output while waiting, and you can cancel with Control+C.

Workspaces with special characters in their name (like `#`) now work correctly in the login flow and across the UI.

## Bug fixes and improvements

- [All]: JWT tokens now correctly use the `__tb__deployment` parameter. Previously, tokens with a deployment scope could fall back to the live deployment instead of the specified one.
- [All]: Rate limiting notification emails are now deduplicated. You no longer receive repeated emails while ingestion backpressure is active.
- [Forward]: Fixed a crash when editing jobs in a Workspace with no active jobs.
- [Forward]: Creating a Forward branch no longer creates an unnecessary release metadata workspace.
- [Forward]: Deployment promotions no longer fail for Workspaces with more than 100 Sink Pipes.

## Deprecations

Tinybird Code and `--prompt` commands will be removed in the next CLI major release. [Here's why we're sunsetting them](https://www.tinybird.co/blog/deprecating-tinybird-code).

You can bring the same capabilities to your preferred AI coding agent with [agent skills](https://github.com/tinybirdco/tinybird-agent-skills):

```shell
npx skills add @tinybirdco/tinybird-agent-skills
```

## From the blog

**[How We Built Tinybird's TypeScript SDK for ClickHouse®](https://www.tinybird.co/blog/how-we-built-clickhouse-typescript-sdk)**: Define your data infrastructure in TypeScript so AI coding agents can read it, build it, and deploy it. Connectors, preview environments, zero-copy branches, and a type system that catches schema mismatches at compile time.

**[The Linux Foundation tracks 700M+ open source events in real-time with Tinybird](https://www.tinybird.co/customer-stories/linux-foundation)**: How LFX Insights replaced a 12-hour Snowflake feedback loop with sub-second data freshness using Tinybird.
