File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -126,9 +126,16 @@ backup-and-swap-in functionality work properly. Given how SQLite aggressively
126
126
[ locks] ( https://sqlite.org/lockingv3.html ) the database anyway, it's probably
127
127
not worth the effort.
128
128
129
- - When inspecting the data types of columns, SQLite returns a blank value for
130
- columns in views (even if it's the result of a CAST) and in certain cases
131
- for columns in tables. These will show up in the generated docs as type 'UNKNOWN'.
129
+ - It's often idiomatic with dbt to use plentiful CASTs. The results of CASTs in
130
+ SQLite are tricky and depend on how the model is materialized. In a nutshell,
131
+ using table materializations gives better results.
132
+
133
+ - When materialized as a view, the resulting column type from any CAST (or
134
+ any expression) will always be empty. The SQLite adapter will regard this
135
+ column type as 'UNKNOWN'.
136
+
137
+ - When materialized as a table, a CAST will result in the specified type for
138
+ INT, REAL, TEXT; casts to NUMERIC and BOOLEAN result in a 'NUM' column type.
132
139
133
140
## SQLite Extensions
134
141
You can’t perform that action at this time.
0 commit comments