On Fri, Mar 01, 2024 at 03:39:54PM -0900, Bryce Mecum wrote:
> Try specifying a schema to `open_dataset` with d1 specified as
> date32[day]. When I do that, I get the correct type for that field and
> the values look correct too.
> 
> schm <- schema(bb)
> new_schm <- schm$SetField(6, arrow::field("d1", arrow::date32()))
> bb <- arrow::open_dataset(..., schema = new_schm)

That approach worked GREAT, thank you!


ss <- schema(bb) ; ii <- (match('d1', ss$names) -1)
ss <- ss$SetField(ii, arrow::field('d1', arrow::date32()))
bb <- arrow::open_dataset(my.dir, format="feather", unify_schemas=TRUE, 
partitioning=c('d1'), schema=ss)

-- 
Andrew Piskorski <a...@piskorski.com>

Reply via email to