Socket
Book a DemoInstallSign in
Socket

@tinybirdco/data-generator

Package Overview
Dependencies
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinybirdco/data-generator

Tinybird data generator

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
5
Created
Source

Tinybird data generator

Features

  • Type defenitions
  • 8 preset schemas
  • Custom random schemas

Installing

$ npm install @tinybirdco/data-generator

Usage

import { initializeGenerator, generate } from "tinybird-generator";

initializeGenerator({
  schema: z
    .object({})
    .optional()
    .default(presetSchemas["Web Analytics Starter Kit"])
    .refine(validateSchema), // Javascript object containing valid generator schema
  endpoint: z.string(), // Tinybird endpoint (eu_gcp, us_gcp or custom one)
  datasource: z.string(), // Name of the Tinybird datasource
  token: z.string(), // Tinybird admin token
  eps: z.number().optional().default(1), // Events per second
  limit: z.number().optional().default(-1), // Event limit
});

await generate();

Preset schemas

import { presetSchemas } from "tinybird-generator";

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

initializeGenerator({
  schema,
  ...
})

Keywords

tinybird

FAQs

Package last updated on 27 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts