zod2bq

1.3.0 • Public • Published

Convert Zod Schemas to BigQuery Schemas

very nice project

import { zod2bq } from "zod2bq"
import { z } from "zod"

const zodSchema = z.object({
      beers: z.array(z.object({ name: z.string() })),
    });
const bigquerySchema = zod2bq(zodSchema);

You can write to JSON file with

const file = "./testBigQuerySchema.json"
const bigquerySchema = zod2bq(zodSchema, file);

Readme

Keywords

none

Package Sidebar

Install

npm i zod2bq

Weekly Downloads

18

Version

1.3.0

License

ISC

Unpacked Size

36.8 kB

Total Files

21

Last publish

Collaborators

  • mindler-sasu