Skip to content

Conversation

@zenon18
Copy link
Contributor

@zenon18 zenon18 commented May 21, 2024

Pull request for #209

Created a generator function that takes a file pointer and a batch size and reads up to that many queries from the file and calls run.

@jhoshiko jhoshiko self-requested a review May 21, 2024 14:19
return results

def run_in_batches(
self, fp: TextIO, batch_size: int
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing a file pointer, let's instead pass a Path or string and then create the file pointer in this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha will update

@jhoshiko
Copy link
Collaborator

jhoshiko commented May 21, 2024

After discussing this feature with the group, it sounds like we should look into adding a parser for query files to prevent crashes from faulty files (See issue #236)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants