2 Replies Latest reply on Apr 20, 2017 9:38 AM by Kuang Chou Lin

    Editing Data Source table, the old columns are not removed.

    Kuang Chou Lin

      When edit a Web Data Connection, if the table columns are changed on same table, the old columns from previous post is not removed.

      This is not happened on Tableau Desktop 10.1.6, but it is happened on version 10.2.0.

        • 1. Re: Editing Data Source table, the old columns are not removed.
          Lénaïc Riédinger

          Hi Kuang Chou Lin,

           

          Would you be able to provide us with something, so we could try to reproduce this issue?

          Did you report it to our teams already?

           

          ----------

          Lénaïc RIÉDINGER, Global Community Engineer Tableau

          Tableau Community Forums | Knowledge Base

          If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!

           

          • 2. Re: Editing Data Source table, the old columns are not removed.
            Kuang Chou Lin

            Hi Lénaïc RIÉDINGER,

             

            I did not report to your team yet.

            The example modified from your WDC earthquakeUSGS example to reproduce it as below:

            1. Modified html file by add an input field.

              <form role="form" id="tickerForm" autocomplete="off">

              <input type="text" id="number" class="form-control" name="number" placeholder="Enter a number to remove column item." value="0">

                            <button type = "button" id = "submitButton" class = "btn btn-success" style = "margin: 10px;">Get Earthquake Data!</button>

              </form>

             

            2. Modified js file in getSchema to remove column.

            myConnector.getSchema = function(schemaCallback) {

                    var cols = [{

                        id: "id",

                        dataType: tableau.dataTypeEnum.string

                    }, {

                        id: "mag",

                        alias: "magnitude",

                        dataType: tableau.dataTypeEnum.float

                    }, {

                        id: "title",

                        alias: "title",

                        dataType: tableau.dataTypeEnum.string

                    }, {

                        id: "lat",

                        alias: "latitude",

                        dataType: tableau.dataTypeEnum.float

                    }, {

                        id: "lon",

                        alias: "longitude",

                        dataType: tableau.dataTypeEnum.float

                    }];

                  if (tableau.connectionData) {

                        cols.splice(0, parseInt(tableau.connectionData, 10));

                   }

                    var tableSchema = {

                        id: "earthquakeFeed",

                        alias: "Earthquakes with magnitude greater than 4.5 in the last seven days",

                        columns: cols

                    };

                    schemaCallback([tableSchema]);

                };

            3. Get the number on submit as below:

                 $(document).ready(function() {

                    $("#submitButton").click(function() {

                        var number = $('#number').val().trim();

                        tableau.connectionName = "USGS Earthquake Feed"; // This will be the data source name in Tableau

                        tableau.connectionData = number;

                        tableau.submit(); // This sends the connector object to Tableau

                    });

                });

             

            To produce the error as below:

            1. Open the WDC and submit it. The table will have five columns.
            2. Edit the WDC connectiion and change the input number to 2 and submit it. The table columns should become to 3 only,