Is it possible to read file of more than 65536 records? #411
Answered
by
fpenarruApr
fpenarruApr
asked this question in
Q&A
-
I have a file with featureCount = 92081 according to ogrinfo, but using ParquetSharp, it seems that I only can read 65536 records. Any ideas? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
fpenarruApr
Jan 22, 2024
Replies: 2 comments 2 replies
-
Hi @fpenarruApr, I don't think any such limitation exists in ParqutSharp. Can you share the code which you use to read the records, so we can try to reproduce the problem locally? |
Beta Was this translation helpful? Give feedback.
2 replies
-
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);
parquetFileReader.Close(); Thanks for your help!! Fran |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
adamreeve
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @marcin-krystianc
You are right! :-)
This code works: