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
I wonder if a convenience function for returning the schema code would be handy for users?
Currently you can extract the schema with:
library(arrow)
#> #> Attaching package: 'arrow'#> The following object is masked from 'package:utils':#> #> timestamp
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
schema(arrow_table(mtcars))
#> Schema#> mpg: double#> cyl: double#> disp: double#> hp: double#> drat: double#> wt: double#> qsec: double#> vs: double#> am: double#> gear: double#> carb: double#> #> See $metadata for additional Schema metadata
And you can extract the schema code with:
library(arrow)
#> #> Attaching package: 'arrow'#> The following object is masked from 'package:utils':#> #> timestamp
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
arrow_table(mtcars)$schema$code()
#> schema(mpg = float64(), cyl = float64(), disp = float64(), hp = float64(), #> drat = float64(), wt = float64(), qsec = float64(), vs = float64(), #> am = float64(), gear = float64(), carb = float64())
The schema code output is very useful for editing/altering and creating schemas, but the code is not very intuitive, especially for new users. I was thinking maybe a schema_code() convenience function might be useful (or some other better suited name).
Component(s)
R
The text was updated successfully, but these errors were encountered:
Describe the enhancement requested
I wonder if a convenience function for returning the schema code would be handy for users?
Currently you can extract the schema with:
And you can extract the schema code with:
The schema code output is very useful for editing/altering and creating schemas, but the code is not very intuitive, especially for new users. I was thinking maybe a
schema_code()
convenience function might be useful (or some other better suited name).Component(s)
R
The text was updated successfully, but these errors were encountered: