bq_field() and bq_fields() create; as_bq_field() and as_bq_fields() coerce from lists.

bq_field(name, type, mode = "NULLABLE", fields = list(),
  description = NULL)

bq_fields(x)

as_bq_field(x)

as_bq_fields(x)

Arguments

name

Field name

type

Field type

mode

Field mode

fields

For a field of type "record", a list of sub-fields.

description

Field description

x

A list of bg_fields

Examples

bq_field("name", "string")
#> <bq_field> name <STRING> #>
as_bq_fields(list( list(name = "name", type = "string"), bq_field("age", "integer") ))
#> <bq_fields> #> name <STRING> #> age <INTEGER> #>
# as_bq_fields() can also take a data frame as_bq_fields(mtcars)
#> <bq_fields> #> mpg <FLOAT> #> cyl <FLOAT> #> disp <FLOAT> #> hp <FLOAT> #> drat <FLOAT> #> wt <FLOAT> #> qsec <FLOAT> #> vs <FLOAT> #> am <FLOAT> #> gear <FLOAT> #> carb <FLOAT> #>