I have data imported into Alteryx using the InDB Connection. The data set is extremely large to use the Data Stream Out on the whole set, so I am trying to cut it beforehand. However, all the Data Fields are Type V_String. Is there an easy way to change the type? I tried to use the Select in DB tool, but it only lets me rename the fields, not change the Type. Is there a better way to do this?
Solved! Go to Solution.
Hello,
What data type are you trying to change it to?
I would recommend using the CAST command within your query. For example, if you want to go from string to numeric, you could use CAST(my_string AS INT).
I am trying to change it to an INT, would you do this using the formula INDB or a different tool?
you should review the sql function commands for the specific syntax of your underlying db. You can then edit in your query itself (case "field" as ...) or in a formula tool using a some kind of cast statment. Note- your fields are "fieldname" vs [fieldname] wen In-DB.
Hello,
I would do it using the Connect In-DB tool.
If you are using the SQL Builder, you would need to add the CAST command to the Expression Section:
Otherwise, you can just write it directly on your initial query: