Skip to main content
Solved

Read only the 1st line of Text/CSV File

  • March 3, 2020
  • 2 replies
  • 297 views

mmccart
Enthusiast
Forum|alt.badge.img+28

I have a CSV file where I need to read only the first line (or first column/line combo) of the file. Is there an easy way to do this with a reader? Or am I stuck reading the whole file? I've tried both the CSV reader and Text File reader. In both, I don't see anyway of isolating this first line of text/data. I'm forced to bring the entire table into the workspace.

 

Thanks in advance!

-Mark

Best answer by ebygomm

You should be able to set the max features to read to 1 in the csv reader parameters in the navigator

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • March 3, 2020

You should be able to set the max features to read to 1 in the csv reader parameters in the navigator


mmccart
Enthusiast
Forum|alt.badge.img+28
  • Author
  • Enthusiast
  • March 3, 2020

You should be able to set the max features to read to 1 in the csv reader parameters in the navigator

Thanks @ebygomm. I actually need to use a FeatureReader, but just saw the 'Max Features To Read' option. I don't know how I missed it.

 

Setting this to '1' worked perfectly!