Add DynamoDB connector to Typescript SDK#165
Open
sandshoes wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class DynamoDB connector support to the Tinybird TypeScript SDK, covering schema definitions, file generation, and migration parsing/emission so DynamoDB resources can be defined and migrated similarly to existing Kafka/S3/GCS connectors.
Changes:
- Add
defineDynamoDBConnection+ DynamoDB connection types and runtime validators. - Add DynamoDB datasource ingestion config (
dynamodb) and enforce “only one ingestion option” across schema/generators/tests. - Extend migration tooling (parse/emit + CLI migrate validation) and documentation to support DynamoDB connections and datasource directives.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/schema/datasource.ts | Adds DynamoDBConfig and dynamodb ingestion option with updated ingestion exclusivity check. |
| src/schema/datasource.test.ts | Updates ingestion-exclusivity error message expectations to include DynamoDB. |
| src/schema/connection.ts | Adds DynamoDB connection types, defineDynamoDBConnection, and isDynamoDBConnectionDefinition. |
| src/schema/connection.test.ts | Adds unit tests for DynamoDB connection creation/validation + type guard. |
| src/migrate/types.ts | Extends migration models to represent DynamoDB datasource + connection resources. |
| src/migrate/parse-datasource.ts | Parses DynamoDB datasource import directives and maps them into migration models. |
| src/migrate/parse-connection.ts | Parses TYPE dynamodb connections and validates directive compatibility. |
| src/migrate/parse-connection.test.ts | Adds migration parser tests for DynamoDB connections and error cases. |
| src/migrate/emit-ts.ts | Emits TS for DynamoDB connections/datasource ingestion + secret-template detection. |
| src/index.ts | Exposes DynamoDB connection APIs/types and datasource DynamoDB config type from the SDK entrypoint. |
| src/generator/datasource.ts | Emits DynamoDB datasource directives (IMPORT_TABLE_ARN, IMPORT_EXPORT_BUCKET) and updates ingestion exclusivity. |
| src/generator/datasource.test.ts | Adds generator tests for DynamoDB datasource directives and ingestion exclusivity. |
| src/generator/connection.ts | Emits .connection content for DynamoDB connections. |
| src/generator/connection.test.ts | Adds generator test for DynamoDB .connection output. |
| src/cli/commands/migrate.ts | Validates DynamoDB datasources reference a dynamodb connection type during migration. |
| src/cli/commands/migrate.test.ts | Adds end-to-end migrate tests for DynamoDB connection + datasource directives and validation failures. |
| README.md | Documents DynamoDB connection/datasource usage examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+586
to
+596
| // DynamoDB import directives share IMPORT_CONNECTION_NAME with blob storage, | ||
| // so treat the import block as DynamoDB whenever a DynamoDB-only directive is present. | ||
| const isDynamoDB = importTableArn !== undefined || importExportBucket !== undefined; | ||
|
|
||
| const dynamodb = isDynamoDB | ||
| ? { | ||
| connectionName: importConnectionName ?? "", | ||
| tableArn: importTableArn ?? "", | ||
| exportBucket: importExportBucket ?? "", | ||
| } | ||
| : undefined; |
Collaborator
|
LGTM! |
rmorehig
approved these changes
Jun 9, 2026
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.
This implements the DynamoDB connector in a functionality mirroring the changes added to the Tinybird Forward CLI.