Skip to content

Arrow python client read and write, did not output the expected metadata #833

Answered by liusitan
liusitan asked this question in Q&A
Discussion options

You must be logged in to vote

apache/arrow#13535
I posted it to the Apache-Arrow community, David liu answered that in arrow, the table metadata is located inside the schema. When I create a writer with a given schema, the table written by the writer must follow the schema. In this example, the metadata in the "schema" variable is None, and the metadata in the t is {"loc":"san diego"}. When creating the writer, the schema is initialized to "schema", which means, whatever t is, its metadata is replaced by None. Further, I found out that, to access the schema, I can call t.schema.metadata. Below is the updated example, printing out extracted metadata.

schema is replaced by the t.schema
pwriter.py

import numpy as np
import 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by liusitan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant