@tinybirdco/mockingbird
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

Mockingbird

Features

  • All faker functions and custom functions
  • Type definitions
  • 5 destinations - Ably, AWS SNS, Confluent Cloud Kafka, Tinybird and Upstash Kafka
  • 8 preset schemas

Installing

$ npm install @tinybirdco/mockingbird

Usage

import { TinybirdGenerator } from "@tinybirdco/mockingbird";

const tbGenerator = new TinybirdGenerator({
  schema: z.object({}), // Javascript object containing valid generator schema
  eps: z.number().optional().default(1), // Events per second
  limit: z.number().optional().default(-1), // Event limit
  logs: z.boolean().optional().default(false), // Enables logs
  endpoint: z.string(), // Tinybird endpoint (e.g. gcp_europe_west3, gcp_us_east4, aws_eu_central_1, aws_us_east_1, aws_us_west_2 or custom one)
  datasource: z.string(), // Name of the Tinybird datasource
  token: z.string(), // Tinybird admin token
});

await tbGenerator.generate();

Preset schemas

import { presetSchemas } from "@tinybirdco/mockingbird";

const schema = presetSchemas["Web Analytics Starter Kit"];

const tbGenerator = new TinybirdGenerator({
  schema,
  ...
})

Package Sidebar

Install

npm i @tinybirdco/mockingbird

Weekly Downloads

487

Version

1.3.0

License

none

Unpacked Size

563 kB

Total Files

10

Last publish

Collaborators

  • rmorehig
  • sdairs
  • alejandromav
  • xavijam
  • jamedina
  • ivanmalagon