jsonschema-bigquery

2019-12-02

jsonschema-bigquery是什么

什么是jsonschema-bigquery,Convert JSON schema to Google BigQuery schema

jsonschema-bigquery使用教程帮助文档

jsonschema-bigquery

npm Build Status

Convert JSON schema to Google BigQuery schema

This includes the ability to:

  1. Create tables
  2. Patch tables

Further enhancements are planned: delete tables (dev only), create dataset, set data ACLs

Note that some features involve bespoke interpretation of schema details suited to our environment.

Install

npm install jsonschema-bigquery

Consume

jsbq -p <gbq project> -d <gbq dataset> -j <json schema file> --preventAdditionalObjectProperties

For embedded usage the following will allow and support runtime schema conversion and table maintenance:

const jsonSchemaBigquery = require('jsonschema-bigquery')
const bigquerySchema = jsonSchemaBigquery.run(jsonSchemaObject, options)

Please ensure that the input JSON schema is dereferenced so that all external references have been resolved. json-schema-ref-parser can do this, prior to using this module.

Options

{
  preventAdditionalObjectProperties: true
}
  • preventAdditionalObjectProperties - boolean, check for additional object properties in schemas.

Test

npm test

上一篇:zeo-name
下一篇:koogn
相关文章

首次访问,人机识别验证

扫描下方二维码回复 1024 获取验证码,验证完毕后 永久 无须验证

操作步骤:[打开微信]->[扫描上侧二维码]->[关注 FedJavaScript 的微信] 输入 1024 获取验证码

验证码有误,请重新输入