L Zhong Posted February 26, 2018 Share Posted February 26, 2018 Hi All, Do you know how tochange the column data type in the script with IronPython I've searched for quite a long time and no one method works. Could you provide a simple example Thank you so much! Best Regards LZ Link to comment Share on other sites More sharing options...
Rayees Wani Posted February 26, 2018 Share Posted February 26, 2018 Looks like the DataColumn. DataType Property is a Read only one and may not be set at Run time. https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-a... However below link has a few suggestions that you may want to try: https://community.spotfire.com/questions/changing-datatype-column-using-iro... Link to comment Share on other sites More sharing options...
Hector Martinez 2 Posted September 9, 2020 Share Posted September 9, 2020 Here is an example: from Spotfire.Dxp.Data.Transformations import ExpressionTransformation,ColumnSelection table = Document.Data.Tables['myTableName'] t = ExpressionTransformation() t.ColumnReplacements.Add( 'myColumnName', 'real([myColumnName])', ColumnSelection('myColumnName') ) table.AddTransformation(t) print("Done Changing Datatypes....") Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now