Skip to content

Commit

Permalink
Change to data type settings
Browse files Browse the repository at this point in the history
Use string instead of int, float or bool data type so can get null values (not 0/0/false) for events where field values not applicable.
  • Loading branch information
lsgs committed Oct 15, 2018
1 parent cd25f7e commit 7dcb3d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions TableauConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,13 @@ function buildDataSource(connectionData, response){

function odmTypeToTableauType(dtype) {
switch (dtype) {
case 'integer': return tableau.dataTypeEnum.int; break;
case 'integer': return tableau.dataTypeEnum.string; break;
case 'text': return tableau.dataTypeEnum.string; break;
case 'float': return tableau.dataTypeEnum.float; break;
case 'float': return tableau.dataTypeEnum.string; break;
case 'date': return tableau.dataTypeEnum.date; break;
case 'datetime': return tableau.dataTypeEnum.datetime; break;
case 'boolean': return tableau.dataTypeEnum.bool; break;
case 'partialDatetime': return tableau.dataTypeEnum.datetime; break;
case 'boolean': return tableau.dataTypeEnum.string; break;
default: return tableau.dataTypeEnum.string;
}
};
Expand Down

0 comments on commit 7dcb3d5

Please sign in to comment.