bigquery-etl/script/json_to_table_ddl

18 строки
482 B
Bash
Executable File

#!/bin/sh
# Creates a Standard SQL DDL statement that recreates a table.
# Takes in input json from a bigquery api or bq command line table
# description.
# See help for arguments. Currently does not implement field options or
# table options besides require_partition_filter.
# Example usage:
# bq show --format json {orignal_table} |
# json_to_table_ddl -d {new_project} -d {new_dataset}
cd "$(dirname "$0")/.."
exec python3 -m bigquery_etl.json_to_table_ddl "$@"