Skip to content

Is it possible to read file of more than 65536 records? #411

Answered by fpenarruApr
fpenarruApr asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @marcin-krystianc

You are right! :-)

This code works:

        var parquetFileReader = new ParquetFileReader(file);
        var ids = new List<string>();
        for (var i = 0; i < parquetFileReader.FileMetaData.NumRowGroups; i++)
        {
            using (RowGroupReader rgReader = parquetFileReader.RowGroup(i))
            {
                int groupNumRows = (int) rgReader.MetaData.NumRows;
                var logicalReader1 = rgReader.Column(0).LogicalReader<String>();
                var idsChunk = rgReader.Column(0).LogicalReader<String>().ReadAll(groupNumRows);
                ids.AddRange(idsChunk);
            }
        }
        Console.WriteLine("Count: " + ids.Count);

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@fpenarruApr
Comment options

@marcin-krystianc
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by adamreeve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants