Skip to content

Commit

Permalink
Merge pull request #96 from JuliaIO/jq/tables
Browse files Browse the repository at this point in the history
Accept any Tables.jl-compatible source to write_parquet
  • Loading branch information
tanmaykm authored Jul 3, 2020
2 parents e0618d4 + ce3eb58 commit a6a3741
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/writer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,8 @@ tbl - A Tables.jl columnaccessible table e.g. a DataFrame
compression_code - Default "SNAPPY". The compression codec. The supported
values are "UNCOMPRESSED", "SNAPPY", "ZSTD", "GZIP"
"""
function write_parquet(path, tbl; compression_codec = "SNAPPY")
# tbl needs to be iterable by column as parquet is a columnar format
@assert Tables.columnaccess(tbl)
function write_parquet(path, x; compression_codec = "SNAPPY")
tbl = Tables.columns(x)

# check that all types are supported
sch = Tables.schema(tbl)
Expand Down

0 comments on commit a6a3741

Please sign in to comment.