Skip to main content
Question

How to remove a column in a text

  • January 17, 2020
  • 9 replies
  • 130 views

How do I remove/filter out the column that says "ADRESS_ID"/ETC?

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.

9 replies

jovitaatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • 635 replies
  • January 17, 2020

Hi @norasaied,

Welcome to the Community! If I'm understanding correctly that you want to remove the attriibute, you can remove it using an AttributeRemover. Conversely you can also deselect it in the writer (under User Attributes, remove the ADDRESS_ID attribute) and it will not write out.

 

 

It's always a good practice for faster performance to remove unwanted attributes early in the workflow though, so perhaps the AttributeRemover will be a better method. Hope that helps!

takashi
Celebrity
  • 7843 replies
  • January 17, 2020

Hi @norasaied, I guess that the source text file is a TSV (tab-separated values) formatted table. If so, you could use the CSV reader to read the table using the first line as field names row and tab as delimiter character, then remove unnecessary columns with the AttributeRemover, as @jovitaatsafe suggested.


  • Author
  • 3 replies
  • January 18, 2020

Hi @norasaied, I guess that the source text file is a TSV (tab-separated values) formatted table. If so, you could use the CSV reader to read the table using the first line as field names row and tab as delimiter character, then remove unnecessary columns with the AttributeRemover, as @jovitaatsafe suggested.

Actually I meant a row -- is it the same procedure?


  • Author
  • 3 replies
  • January 18, 2020

Hi @norasaied,

Welcome to the Community! If I'm understanding correctly that you want to remove the attriibute, you can remove it using an AttributeRemover. Conversely you can also deselect it in the writer (under User Attributes, remove the ADDRESS_ID attribute) and it will not write out.

 

 

It's always a good practice for faster performance to remove unwanted attributes early in the workflow though, so perhaps the AttributeRemover will be a better method. Hope that helps!

Actually I meant a row -- is it the same procedure?

And would not like to remove it, just 'filter' it out.

Thanks @jovitaatsafe


takashi
Celebrity
  • 7843 replies
  • January 18, 2020

Hi @norasaied, I guess that the source text file is a TSV (tab-separated values) formatted table. If so, you could use the CSV reader to read the table using the first line as field names row and tab as delimiter character, then remove unnecessary columns with the AttributeRemover, as @jovitaatsafe suggested.

I just want to know if the source text is tab-separated values formatted. If you could post the text file here, it would help us to find an appropriate solution.


  • Author
  • 3 replies
  • January 18, 2020

I just want to know if the source text is tab-separated values formatted. If you could post the text file here, it would help us to find an appropriate solution.

It is a .txt file. Here is an image of the text file.


takashi
Celebrity
  • 7843 replies
  • January 18, 2020

Hi @norasaied, I guess that the source text file is a TSV (tab-separated values) formatted table. If so, you could use the CSV reader to read the table using the first line as field names row and tab as delimiter character, then remove unnecessary columns with the AttributeRemover, as @jovitaatsafe suggested.

Cannot identify how the table is formatted only by looking screenshots.

I guess that the text table is formatted with tab-separated values. If so, you can read the table with the CSV reader then remove unnecessary columns easily.

Did you try reading the text with the CSV reader?


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • January 19, 2020

If you could post the actual text file here as an attachment (or a small section of it, the top couple of rows, as long as they have the one you're trying to filter out) that would help us a lot in trying to help you.


robotix
Contributor
Forum|alt.badge.img+10
  • Contributor
  • 33 replies
  • January 20, 2020

@norasaied from your example it looks like you can use a TESTER.

You can use the example settings for any row filter. I use it all the time.

You may need to play with the syntax a little but I think you can get the idea.