diff --git a/dbt/schema.py b/dbt/schema.py index 0e0c4c2e037..87c6e4e972b 100644 --- a/dbt/schema.py +++ b/dbt/schema.py @@ -43,7 +43,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):