02-02-2022 05:17 AM
I got my first script snap to run successfully, but would like to change data types in specific columns. I could do this with a mapper snap I guess but would like to see it in the Script snap if anyone has an example.
02-02-2022 05:37 AM
Hey @ryan,
I’ve never done this, but a regular cast should work for the numbers for example. I did a quick sample in Python that includes changing string to int, and string to datetime, check it out:
Pipeline:
DataTypes Change.slp (5.3 KB)
Let me know if this helps
02-02-2022 06:08 AM
@bojanvelevski Thank you, I got a script running with changes to datatypes right after I posted that. I was a little confused by the documentation but the standard python methods worked. I will definitely take a look at your example, the more I see the better. Thanks again.