2 Replies Latest reply on Nov 13, 2018 2:05 PM by Miguel Montes

    Prep - Source - Original field name changed

    Miguel Montes

      Hi all,

      Do you have any suggestion on how to handle data source updates in Tableau Prep when the original field name changes?.  I give you an specific example.  We receive this spreadsheet monthly with the name of one of the columns as "code_day_month_year" and the "day_month_year" part depends on the date that they process their data.   When I designed my Tableau Prep flow the original field name of that column was "code_1_october_2018".  The following month it changed to "code_3_november_2018".  So when I run my flow I got some errors because it couldn't find the original field name.  Any suggestions on how to handle this?

       

      Many thanks,

      Miguel

        • 1. Re: Prep - Source - Original field name changed
          Don Wise

          Hi Miguel,

          Yes, that's fairly easy to resolve.  Please see below screenshots. I imported a table of MS-Excel data.  I then imported a second set of data that's identical to the first, but changed the State field to State_1 to force the error/issue.  I then UNIONED the table with State_1 to the table with State (original file).  Tableau Prep will identify the mis-matched fields.  Simply select, then right-click, then select MERGE.  Delete Table Names and you should be good.  If this resolves your issue, please mark this response as correct. Thx! Don

           

          Original table of data...note the State field is labeled as State:

          Screen Shot 2018-11-12 at 2.16.41 PM.png

          Added a secondary table of data...not the State field is labeled as State_1:

          Screen Shot 2018-11-12 at 2.17.00 PM.png

          UNION the two tables together:

          Screen Shot 2018-11-12 at 2.17.11 PM.png

          Tableau Prep will then note the mismatched fields; select the ones you want to merge, then rich-click and then click merge.

          Screen Shot 2018-11-12 at 2.17.28 PM.png

          • 2. Re: Prep - Source - Original field name changed
            Miguel Montes

            Hi Don,

            Many thanks for your reply but I don't think is what I was looking for but I also have to say that I find a work around solution to it.

             

            I try to explain better my architecture.  Normally I am going to be receiving excel workbooks monthly , and I saved them in the same folder with the same file name and just replace the old ones.  File names are the same , so no problem there.  But what changes is one of the column names identifying the end of the field name with the updating date 'code_14_nov_2018' for example.  You can imaging what happen if I then create calculated fields based on that field.  The ideal solution would be to have a way to tell prep to recognize my field based on the start or ending of the name.  In this example , it would be 'code_'.

             

            My workaround is going to be the following.  For each of my datasources I've been using the 'data interpreter' option, I find it to be a fantastic feature.  But in this example didn't work on my favor.  My datasources headers are in row 6 (my data starts in row 7) and what 'data interpreter' was doing was to merge whatever value was in row 1 - 5 with the column header in row 6.  Thats where I was getting the upload date value merge with my column header name.  So what I am going to do is to untick the 'data interpreter' option and somehow filter out the rows 1 - 5 later in the prep flow.

             

            Another solution for the future, could be if Prep creates a feature where we can tell what row our dataset starts.

             

            Much appreciated for your previous response Don.

             

            Kind regards,

            Miguel