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

Python CompassApp run_from_file method supports CSV, newline JSON with batching #98

Open
robfitzgerald opened this issue Jan 4, 2024 · 2 comments
Labels
python Applies to the python code

Comments

@robfitzgerald
Copy link
Collaborator

in order to run very large batches of queries, we want a method on a CompassApp which

  • takes a filename and chunksize argument (with reasonable default)
  • by testing the filename suffix, chooses pandas from_csv or from_json with lines=True
  • chunks the input, passes it to CompassApp.run

question: is it possible to do this without 1) converting each dataframe to a python List[Dict], 2) stringifying the List?

@robfitzgerald
Copy link
Collaborator Author

The CLI has been updated with this feature and the logic of writes should have the correct append output behavior to support batching from Python.

It would seem like this should just be a simple wrapper function in Python that creates the matches, such as the pandas chunking API.

@nreinicke nreinicke added the python Applies to the python code label May 18, 2024
@nreinicke
Copy link
Collaborator

This is directly related to #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Applies to the python code
Projects
None yet
Development

No branches or pull requests

2 participants