From 45bf05a8bc04672e96cbf863796b7bb99f8e9a01 Mon Sep 17 00:00:00 2001 From: Mayur Pipaliya Date: Wed, 11 Mar 2020 10:14:07 -0700 Subject: [PATCH] Fixed: Auto-sensing failure with inconsistant data --- src/splunk-wdc.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/splunk-wdc.js b/src/splunk-wdc.js index 94f95de..d6116fc 100644 --- a/src/splunk-wdc.js +++ b/src/splunk-wdc.js @@ -202,6 +202,8 @@ Object.keys(res[0]).forEach(function (key) { log('Key : ' + key + ', Value : ' + res[0][key]); + /* + // Commented due to RegEx failing for inconsistant data. if ( res[0][key].match(/^-?\d+$/) ) { // Integer column definition (int) @@ -264,7 +266,13 @@ alias: key, dataType: tableau.dataTypeEnum.string }); - } + }*/ + // All data is String - column definition - User can change the datatype in Tableau. + cols.push({ + id: key, + alias: key, + dataType: tableau.dataTypeEnum.string + }); }); // End foreach key