From 180581e526fb4909c2f706c088e929c27d38a7f7 Mon Sep 17 00:00:00 2001 From: Anton Avramov Date: Sat, 20 Jul 2019 11:16:17 -0400 Subject: [PATCH] Update to prefer STRING if one is found in the column --- lib/guess-model.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/guess-model.js b/lib/guess-model.js index 923e0af..de54cd9 100644 --- a/lib/guess-model.js +++ b/lib/guess-model.js @@ -138,6 +138,10 @@ function dataToType(data, name, tablesOptions = {}) { else if (_.size(counted) === 1) { kind = top.kind; } + // If there is a string, use strin + else if (counted.STRING) { + kind = 'STRING'; + } // If there is an integer and a float, use float else if (counted.INTGER && counted.FLOAT) { kind = 'FLOAT';