We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am converting XML encoded data to CSV, however, some nested elements appear as "ARRAY" objects: see sample command and output below.
data$ catmandu convert OAI --metadataPrefix qdc --url http://dspace.unza.zm/oai/request to CSV | cat -n | more 1 _about,_datestamp,_id,_identifier,_metadata,_resumption,_resumptionToken,_setSpec,_status 2 ARRAY(0x2141480),2019-08-19T12:30:47Z,oai:dspace.unza.zm:123456789/4153,oai:dspace.unza.zm:1234567 89/4153,ARRAY(0x42a0010),HASH(0x3bdf138),qdc////100,ARRAY(0x3c47d40),
I would like to create a CSV file with all headers and values for each of the ARRAY objects, however, I am having challenges using join_fields.
On a related note, how would one print out the entire ARRAY contents?
The text was updated successfully, but these errors were encountered:
Hi,
you can use the "collapse" fix to flatten the nested data structure:
$ catmandu convert OAI --metadataPrefix qdc --url http://dspace.unza.zm/oai/request to CSV --fix 'collapse()'
... or use the "oai_dc" handler option with the "join_field" fix on array fields:
$ catmandu convert OAI --metadataPrefix qdc --url http://dspace.unza.zm/oai/request --handler oai_dc to CSV --fields abstract --fix 'join_field(abstract,";")'
Cheers
Sorry, something went wrong.
Thank you for this. I did try out collapse after seeing an issue on here: no luck there.
I ended up exporting to JSON and working with JSON. It turns out, I am processing the data via Pandas.
No branches or pull requests
I am converting XML encoded data to CSV, however, some nested elements appear as "ARRAY" objects: see sample command and output below.
I would like to create a CSV file with all headers and values for each of the ARRAY objects, however, I am having challenges using join_fields.
On a related note, how would one print out the entire ARRAY contents?
The text was updated successfully, but these errors were encountered: