diff --git a/dbt/schema.py b/dbt/schema.py index 3a34903a867..f4b75e7b6a1 100644 --- a/dbt/schema.py +++ b/dbt/schema.py @@ -45,7 +45,7 @@ def data_type(self): return self.dtype def is_string(self): - return self.dtype.lower() in ['text', 'character varying'] + return self.dtype.lower() in ['text', 'character varying', 'character'] def is_numeric(self): return self.dtype.lower() in ['numeric', 'number'] diff --git a/test/unit/test_schema.py b/test/unit/test_schema.py index a7c3d94fff0..6c065a422d7 100644 --- a/test/unit/test_schema.py +++ b/test/unit/test_schema.py @@ -2,6 +2,17 @@ import dbt.schema +class TestStringType(unittest.TestCase): + + def test__character_type(self): + col = dbt.schema.Column( + 'fieldname', + 'character', + char_size=10 + ) + + self.assertEqual(col.data_type, 'character varying(10)') + class TestNumericType(unittest.TestCase):