Removing a row from BufferedDataTable

So I have an input of a table which is BufferedDataTable.

I want to loop through it, and while looping through it, if I don't find it in a row, I want to remove that row, but I don't see it on BufferedDataTable.

Is there any way around it to remove from BufferedDataTable?

Can anyone suggest me a way to convert BufferedDataTable to allow adding and removing of the row?

Thank you very much.

No, you need to create a new table by copying all rows except the one that you want to remove. Appending rows is easier. Create a new BufferedDataContainer and add the new rows to it. Then use createConcatenateTable on the ExecutionContext to combine the original table and the table with the new rows. Make sure that the specs of both tables match.

Problem I have is that I need to iterate through the table while removing the rows from that table.

For example, I loop through the buffereddatatable rows on first column and compare with bunch of numbers to remove rows that has no hits. If there is exactly one hit, copy that row to output table. Then loop through it again on next column of rows which had more than one hit. I have to do this until no columns are left, or there aren't rows to copy anymore.

Can anyone give me some idea of how to do this?

Thank you very much.

What about iterating the table and keeping a second data structure that contains information as to what rows should be kept? Sounds as if it's more a challenge of creating a efficient data structure (e.g. respecting memory constraints). Always keep in mind that (a) iterating the input table is possibly expensive (reading from disk) and (b) that tables can be large, getting everything into memory often doesn't pay the bill.