JosiahParry opened a new issue, #37860:
URL: https://github.com/apache/arrow/issues/37860

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I can add metadata to a parquet dataset directly in R like the below. (As an 
aside, the `WithMetadata()` R6 method does not assign metadata, that can be 
cleared up / documented better :P) 
   
   However, reading the resultant dataset from PyArrow cannot find the 
metadata. 
   
   ```r
   library(arrow)
   tbl <- arrow_table(iris)
   
   cur_meta <- tbl$metadata
   cur_meta[["test"]] <- "testing other metadata"
   tbl$metadata <- cur_meta
   
   write_dataset(tbl, "data/iris", partitioning = "Species")
   open_dataset("data/iris")$metadata
   #> $r
   #> $r$attributes
   #> $r$attributes$class
   #> [1] "data.frame"
   #> 
   #> $r$columns
   #> $r$columns$Sepal.Length
   #> NULL
   #> 
   #> $r$columns$Sepal.Width
   #> NULL
   #> 
   #> $r$columns$Petal.Length
   #> NULL
   #> 
   #> $r$columns$Petal.Width
   #> NULL
   #> 
   #> $r$columns$Species
   #> NULL
   #> 
   #> $test
   #> [1] "testing other metadata"
   ```
   
   The result of the pyarrow call is here: 
   
   ```python
   import pyarrow.parquet as pq
   pq.ParquetDataset("data/iris").metadata
   #> AttributeError: '_ParquetDatasetV2' object has no attribute 'metadata'
   ```
   
   Metadata should persist / be available by other languages reading the files
   
   ### Component(s)
   
   Parquet, Python, R


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to