You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dbt Classes Instance Methods is_string, is_numeric, is_number, is_float don't seem to work #1380
I can pick this up. The same issue was reported in dbt-spark (#658) and the root cause is the same — the Column base class methods like is_string() check against type names that don't include Spark/Databricks types.
Looking at the code, is_string() in the base Column class likely checks for types like text, character varying, etc. (PostgreSQL-style names), but Databricks returns string as the dtype. The fix is to override the string_type classmethod (or the equivalent type classification method) in the Databricks Column implementation to include string in the set of recognized string types.
Same pattern for is_number() — Databricks uses int, bigint, double, etc. which may not all be in the base class's numeric type set.
I'll look at the Column adapter class and send a PR.
Overrides is_string(), is_number(), is_float(), is_integer(), and is_numeric() on DatabricksColumn with the full set of Spark/Databricks type names. The base Column class only knows PostgreSQL types, which is why these all returned False.
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.
Activity
psaikaushik commentedon Apr 12, 2026
I can pick this up. The same issue was reported in dbt-spark (#658) and the root cause is the same — the
Columnbase class methods likeis_string()check against type names that don't include Spark/Databricks types.Looking at the code,
is_string()in the baseColumnclass likely checks for types liketext,character varying, etc. (PostgreSQL-style names), but Databricks returnsstringas the dtype. The fix is to override thestring_typeclassmethod (or the equivalent type classification method) in the DatabricksColumnimplementation to includestringin the set of recognized string types.Same pattern for
is_number()— Databricks usesint,bigint,double, etc. which may not all be in the base class's numeric type set.I'll look at the Column adapter class and send a PR.
fix: override is_string/is_number/is_float/is_integer on DatabricksCo…
psaikaushik commentedon Apr 12, 2026
PR up: #1390
Overrides
is_string(),is_number(),is_float(),is_integer(), andis_numeric()onDatabricksColumnwith the full set of Spark/Databricks type names. The baseColumnclass only knows PostgreSQL types, which is why these all returnedFalse.fix: override type classification methods for Databricks/Spark types (d…
fix: override is_string/is_number/is_float/is_integer on DatabricksCo…
test: add unit tests and changelog for type classification fix (datab…
test: add unit tests and changelog for type classification fix (datab…
test: add unit tests and changelog for type classification fix (datab…
github-actions commentedon Oct 25, 2026
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.
fivetran-catfritz commentedon Oct 27, 2026
Yes this should still be fixed. No more stale please.