Skip to content
New issue

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

add InsertableTable.insert_file() #23

Open
mkornacker opened this issue Oct 6, 2023 · 0 comments
Open

add InsertableTable.insert_file() #23

mkornacker opened this issue Oct 6, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@mkornacker
Copy link
Collaborator

mkornacker commented Oct 6, 2023

Right now, the only way to insert data is via insert(), which expects an in-memory structure.

insert_file(path: str) -> UpdateStatus would accept a path to a file and insert the data, depending on the file format:

  • json: contains a list of json objects and can be converted to a list of dicts with json.load(); each object must contain the table's column names as fields
  • csv: needs to have a header row, and the column names must correspond to the table's columns
@mkornacker mkornacker added the good first issue Good for newcomers label Oct 6, 2023
@mkornacker mkornacker changed the title MutableTable.insert_json() add InsertableTable.insert_file() Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant