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
The result set for the default adapter's get_columns_in_table method returns columns unordered. In customizing dbt for my own use, I found it much easier to retain the original ordinal position. Debugging was simpler as I could compare directly to my database tool without mental friction.
This would be simple to implement, around line 188 in dbt/adapters/default.py
Cool - I should've mentioned that I didn't see this method overridden in the subclassed adapters. I assumed that, since the other PostgresAdapter derived adapters are using information_schema.columns, then the ordinal_position metacolumn was available in those platforms.
The result set for the default adapter's get_columns_in_table method returns columns unordered. In customizing dbt for my own use, I found it much easier to retain the original ordinal position. Debugging was simpler as I could compare directly to my database tool without mental friction.
This would be simple to implement, around line 188 in dbt/adapters/default.py
https://github.com/fishtown-analytics/dbt/blob/f039bb632df17b0cd2cf81b32b6d8366cb17b980/dbt/adapters/default.py#L188
Something like:
sql += "\norder by ordinal_position"
The text was updated successfully, but these errors were encountered: