如何创建没有列数据类型的tableau wdc?

I am trying to use tableau wdc for the first time. I used the source from tableau tutorial.I want to create schema with no column data type.I want to work my code like tableau works the text file.I think when text file is directly run on tableau, tableau automatically defines the data type of the columns of text files. Here is my code.

javascript

(function () {
    var myConnector = tableau.makeConnector();

    myConnector.getSchema = function (schemaCallback) {
        var cols = [{
            id: "id",
            dataType: tableau.dataTypeEnum.string
        }, {
            id: "mag",
            dataType: tableau.dataTypeEnum.float
           // dataType: tableau.dataTypeEnum.string

        }, {
            id: "title",
            dataType: tableau.dataTypeEnum.string

        }, {
            id: "location",
            dataType: tableau.dataTypeEnum.geometry
            //dataType: tableau.dataTypeEnum.string

        }];

        var tableSchema = {
            id: "earthquakeFeed",
            columns: cols
        };

        schemaCallback([tableSchema]);
    };
    myConnector.getData = function(table, doneCallback) {
        $.getJSON("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.geojson", function(resp) {
            var feat = resp.features,
                tableData = [];

            // Iterate over the JSON object
            for (var i = 0, len = feat.length; i < len; i++) {
                tableData.push({
                    "id": feat[i].id,
                    "mag": feat[i].properties.mag,
                    "title": feat[i].properties.title,
                    "location": feat[i].geometry
                });
            }

            table.appendRows(tableData);
            doneCallback();
        });
    };
    $(document).ready(function () {
        $("#submitButton").click(function () {
            tableau.connectionName = "USGS Earthquake Feed";
            tableau.submit();
        });
    });

    tableau.registerConnector(myConnector);
})();

With the WDC you are creating an Extract directly and you need to tell Tableau the dataType. It isn't an optional property.

When Tableau imports a text file it makes its best guess as to the column type but you cannot let Tableau decide the column type with the WDC.

In either case, you can still change the data type after you load the data when you are building the Viz.