{"id":28767120,"url":"https://github.com/thedumbterminal/jsonschema-bigquery","last_synced_at":"2025-07-12T01:04:22.531Z","repository":{"id":32768902,"uuid":"141847175","full_name":"thedumbterminal/jsonschema-bigquery","owner":"thedumbterminal","description":"Convert JSON schema to Google BigQuery schema","archived":false,"fork":false,"pushed_at":"2025-07-04T13:31:43.000Z","size":1394,"stargazers_count":26,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-04T15:10:35.174Z","etag":null,"topics":["bigquery","json-schema","node-js","node-module","nodejs","nodejs-module","nodejs-modules"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thedumbterminal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-21T21:31:21.000Z","updated_at":"2025-07-04T13:30:34.000Z","dependencies_parsed_at":"2023-01-16T22:45:10.424Z","dependency_job_id":"b0489f6c-4b22-4b78-a505-f33f58630259","html_url":"https://github.com/thedumbterminal/jsonschema-bigquery","commit_stats":{"total_commits":214,"total_committers":10,"mean_commits":21.4,"dds":0.5841121495327103,"last_synced_commit":"d10902c57f852ff5926e51c5f29f083fc8329fef"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/thedumbterminal/jsonschema-bigquery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbterminal%2Fjsonschema-bigquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbterminal%2Fjsonschema-bigquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbterminal%2Fjsonschema-bigquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbterminal%2Fjsonschema-bigquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedumbterminal","download_url":"https://codeload.github.com/thedumbterminal/jsonschema-bigquery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedumbterminal%2Fjsonschema-bigquery/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264922797,"owners_count":23683693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","json-schema","node-js","node-module","nodejs","nodejs-module","nodejs-modules"],"created_at":"2025-06-17T13:01:02.881Z","updated_at":"2025-07-12T01:04:22.515Z","avatar_url":"https://github.com/thedumbterminal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonschema-bigquery\n\n[![npm](https://img.shields.io/npm/v/jsonschema-bigquery.svg)](https://www.npmjs.com/package/jsonschema-bigquery)\n[![Node.js CI](https://github.com/thedumbterminal/jsonschema-bigquery/actions/workflows/main.yml/badge.svg)](https://github.com/thedumbterminal/jsonschema-bigquery/actions/workflows/main.yml)\n\nConvert JSON schema to Google BigQuery schema\n\nThis includes the ability to:\n\n1. Create tables\n1. Patch tables\n\nFurther enhancements are planned: delete tables (dev only), create dataset, set data ACLs\n\nNote that some features involve bespoke interpretation of schema details suited to our environment.\n\n## Install\n\n    npm install jsonschema-bigquery\n\n## Consume\n\n    jsbq -p \u003cgbq project\u003e -d \u003cgbq dataset\u003e -j \u003cjson schema file\u003e --preventAdditionalObjectProperties --continueOnError\n\nFor embedded usage the following will allow and support runtime schema conversion and table maintenance:\n\n    const jsonSchemaBigquery = require('jsonschema-bigquery')\n    const bigquerySchema = jsonSchemaBigquery.run(jsonSchemaObject, options)\n\nPlease ensure that the input JSON schema is dereferenced so that all external references have been resolved. [json-schema-ref-parser](https://www.npmjs.com/package/json-schema-ref-parser) can do this, prior to using this module.\n\n### Options\n\n```\n{\n  preventAdditionalObjectProperties: true,\n  continueOnError: false\n}\n```\n\n- `preventAdditionalObjectProperties` - boolean, check for additional object properties in schemas.\n- `continueOnError` - boolean, continues conversion if problem JSON is encountered. Problems will be excluded from resulting schema.\n\n### Usage with bq CLI tool\n\nGoogle maintains a CLI tool called `bq` which allows the management of BigQuery tables:\n\nhttps://cloud.google.com/bigquery/docs/reference/bq-cli-reference\n\nTo create a table from a JSON schema using other options that our `jsbq` does not support, use the following commands:\n\nFirst, output the generated GBQ schema to a file:\n\n```\nnpx jsbq -j test/integration/samples/complex/input.json \u003e /tmp/schema.json\n```\n\nThen run the `bq` command to create a table:\n\n```\nbq mk --schema=/tmp/schema.json test_dataset.test_table\n```\n\nPlease see the bq reference for table creation options:\n\nhttps://cloud.google.com/bigquery/docs/reference/bq-cli-reference#bq_mk\n\n## Test\n\n    npm test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedumbterminal%2Fjsonschema-bigquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedumbterminal%2Fjsonschema-bigquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedumbterminal%2Fjsonschema-bigquery/lists"}