New TIBCO Community Launches Soon!
The community will temporarily be 'read-only' beginning July 8th until the launch.
Is there a way to make Spotfire automatically "guess" the DataTypes of columns when importing data using IronPython?
Hello,
When importing data from a text file using IronPython using code such as this:
readerSettings = TextDataReaderSettings()
readerSettings.Separator = "\t" # Our text file is tab-delimited
readerSettings.AddColumnNameRow(0)
readerSettings.AddIgnoreRow(1) # Ignore the bad data type row completely
# create a data source to read in the file
textDataSource = TextFileDataSource(dataPath, readerSettings)
newTable = Document.Data.Tables.Add("My Table", textDataSource)
tableSettings = DataTableSaveSettings(newTable, True, False) # UseLinkedData = True; ??? = False
tableSettings.UseLinkedData = True # To be safe
Document.Data.SaveSettings.DataTableSettings.Add(tableSettings)
is there a way to make Spotfire automatically "guess" the data types of columns (like when you open the "Import settings" window for a data source, then click "Refresh," and all the types get set automatically)? Currently, every single column gets imported as a String, regardless of whether it is solely numeric or not.
I know that specifying a TypeRow is the preferred method for setting DataTypes automatically, but the data I am working with unfortunately has unhelpful type rows (which, for example, list some - but not all - numeric columns as being of type "STRING"), and they are out of my control.
Thank you very much,
Charles