You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve API for configuring the schema for a BigQuery Table #217
The current JSON-as-hash mechanism for setting a Table schema is needlessly verbose and exposes the all-caps convention of the underlying Rest API. Here is the example from the docs.
require"gcloud"gcloud=Gcloud.newbigquery=gcloud.bigquerydataset=bigquery.dataset"my_dataset"schema={"fields"=>[{"name"=>"first_name","type"=>"STRING","mode"=>"REQUIRED"},{"name"=>"cities_lived","type"=>"RECORD","mode"=>"REPEATED","fields"=>[{"name"=>"place","type"=>"STRING","mode"=>"REQUIRED"},{"name"=>"number_of_years","type"=>"INTEGER","mode"=>"REQUIRED"}]}]}table=dataset.create_table"my_table",name: "My Table",schema: schema
I believe it would improve the API to use something more structured and native to Ruby, such as a builder inside a block:
Activity
jgeewax commentedon Aug 13, 2015
Likely related to googleapis/google-cloud-python#1058 (Python)
Merge pull request #264 from quartzmo/bigquery-schema