Forum Discussion

awff's avatar
awff
Icon for Helper III rankHelper III
4 years ago

Choose columns vs remove columns

Hi,

 

A question I ask myself is in terms of performance is there any advantage between choose columns vs remove columns?

 

I understand that choose columns would provide an easier means to trace and revert back any columns that maybe needed in the future, but does either of the two actually provide an advantage?

2 Replies

  • pk_Ross's avatar
    pk_Ross
    Regular Visitor

    Best practise is to choose the columns that you want to keep, and don't make any reference to unwanted columns. That way if the data source were to change for one of those unwanted columns (deleting or renaming), it won't break your model - nothing more annoying than having a refresh break because of a source change for a column you weren't even interested in. Moreover, this also protects your model from the appearance of new (and unwanted) columns in your data source. If you're getting down to your preferred columns by explicitly removing the unwanted ones, then if a new unwanted column is added, it flows out into your data model until you update the code to add it to the remove list.

    • danextian's avatar
      danextian
      Icon for Super User rankSuper User

      I agree with pk_Ross . You want to choose only those that are relevant to your data model, those that you want to keep. You don't want unnecessary columns to suddenly pop-up in your model.  Do Remove if you expect that those columns will not be deleted  or renamed in the future.