Type casting in preview table in DataSpell when SQL query is output

I can't understand why Dataspell converts a text column to the integer type. I looked at the ddl table schema and there is a varchar type. But for some reason the integer type is displayed in the preview and statistics are provided for it. How can I explicitly prohibit this from happening in the settings?

SELECT DISTINCT CAST(year_ AS VARCHAR(4)), fid_hash
FROM mat_view.fns_2022_ind_metrics_by_fid_for_power_bi
LIMIT 100

I tried to find settings to prevent this from happening, but I couldn't.

 

0

Please sign in to leave a comment.