Skip to main content
Question

How to remove a column in a text

  • January 17, 2020
  • 9 replies
  • 104 views

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

9 replies

jovitaatsafe
Safer
Forum|alt.badge.img+11

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
Evangelist
  • 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
  • January 18, 2020
takashi wrote:

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
  • January 18, 2020
jovitaatsafe wrote:

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
Evangelist
  • January 18, 2020
takashi wrote:

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
  • January 18, 2020
takashi wrote:

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
Evangelist
  • January 18, 2020
takashi wrote:

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+50

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
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings