Hello Everyone, I am trying to read a csv file fro...
# troubleshooting
a
Hello Everyone, I am trying to read a csv file from s3 partially. Is it possible in flink. Assuming csv file has 1000 rows, i want to read only 200 rows of the file. I can achieve it using the Datastream's filter function or Table.limit function but it loads entire 1000 rows and then filters 200 rows from it. But my requirement is to read only first 200 rows from the file irrespective of total rows present in that csv file. is it achievable in flink?
m
I'm not sure if CSV and S3 support Filter/Predicate Pushdown.
a
via filter, i hv tried, it works but can u give me more details about Predicate Pushdown.
im new to flink, hence i am asking
d
I believe it depends on how you fetch the data from s3, if you fetch with AWS sdk api, it's possible to fetch a range of data, but you need to know the start and the end offset of the data you want to query While if you stream the data from s3, it's unavoidable to fetch the whole file as a stream and you filter what you need
m
via filter, i hv tried, it works but can u give me more details about Predicate Pushdown.
It's an internal optimization that pushes the filter downstream, so that (like you want) you only read 200 rows directly instead of first loading a 1000 and then filters those down to 200. But you can't change that yourself.
a
Hi Martin Visser, can u pls provide me the class name which contains this. I will rewrite the class in my project as per my requirements.