Better document that records should be a list/iterable of data dictionaries
See original GitHub issueAs mentioned in https://github.com/fastavro/fastavro/issues/252#issuecomment-407165534, it’s not as clear as it should be that records
is an iterable of data dictionaries. If someone provides just a dictionary they get a confusing exception. Perhaps we could also add a small check to make sure data is an acceptable format.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Make a Data Dictionary - OSF Support
The purpose of a data dictionary is to explain what all the variable names and values in your spreadsheet really mean. Variable names;...
Read more >Data Dictionaries | U.S. Geological Survey - USGS.gov
A data dictionary is used to catalog and communicate the structure and content of data, and provides meaningful descriptions for individually named data...
Read more >A Quick Guide to Data Dictionary | CMS
A data dictionary1 is a collection of descriptions of data objects or terms, definitions, and properties in a data asset. Data dictionaries ......
Read more >Data Dictionary: a how to and best practices | by Carl Anderson
First, pull any definitions from any existing documentation. This could be from a wiki, annual reports, or from actual code such as SQL...
Read more >Best Practices for Describing Your Data: Data Dictionaries
In most cases, you should create your dictionary as a plain text file with an introduction giving basic information about the dataset, followed....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@300LiterPropofol Are you trying to use
writer
orschemaless_writer
?Suppose you have a record like this:
If you are using
writer
, it expects an iterable of records. An easy way to write a single record would be like this:If you are using
schemaless_writer
, it expects a single record (since it can only be used to encode a single record). Therefore, it is called like this:Does this answer your question?
Thank you very much for your reply! I noticed this difference after re-reading the source code a couple of times. Also I finally found my exception is not essentially caused by
schemaless-writer
function’srecord
input format but something’s format inside therecord
, your explanation is really clear and really helpful. Thank you for being so patient and helpful all way along.