Skip to content

Reading specific rows from a large sas7bdat file #317

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

Open
BERENZ opened this issue Sep 10, 2024 · 1 comment
Open

Reading specific rows from a large sas7bdat file #317

BERENZ opened this issue Sep 10, 2024 · 1 comment

Comments

@BERENZ
Copy link

BERENZ commented Sep 10, 2024

Is there a way to add functionality to read specific rows from a large sas7bdat file? The issue I'm facing is that I have large SAS files (around 10GB) along with text files (an exact, flat copy of the SAS file). Based on the text file, I can specify the subset of rows that I'm interested in (around 10% of the file).

Another option is to specify a filter while reading, for example, reading rows based on a column. However, I understand that this may be more challenging to implement.

@mettekou
Copy link
Contributor

mettekou commented Mar 4, 2025

Is there a way to add functionality to read specific rows from a large sas7bdat file? The issue I'm facing is that I have large SAS files (around 10GB) along with text files (an exact, flat copy of the SAS file). Based on the text file, I can specify the subset of rows that I'm interested in (around 10% of the file).

@BERENZ Are readstat_error_t readstat_set_row_offset(readstat_parser_t *parser, long row_offset) and readstat_error_t readstat_set_row_limit(readstat_parser_t *parser, long row_limit) an option here?

Another option is to specify a filter while reading, for example, reading rows based on a column. However, I understand that this may be more challenging to implement.

I do not see how to implement this using the current version of ReadStat.

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

No branches or pull requests

2 participants