Error "Invalid column name" appears when trying to save an information link (because of leading spaces in column names)
book
Article ID: KB0079828
calendar_today
Updated On:
Products
Versions
Spotfire Analyst
All Versions
Description
Spotfire Information Services is truncating leading and trailing spaces in column names. Therefore you may get a mismatch between the column name requested by Spotfire and the actual column name in the database, if e.g. the column name in the database starts with a blank space. The error "Invalid column name" appears when trying to save the information link.
An example of when this can happen is when having imported an Excel file to SQL Server, and then adding columns from this table to an Information link in Spotfire. If the column names in Excel start with blank spaces, then these will follow to SQL Server.
Issue/Introduction
Spotfire Information Services is truncating leading and trailing spaces in column names. Therefore you may get a mismatch between the column name requested by Spotfire and the actual column name in the database, if e.g. the column name in the database starts with a blank space. The error "Invalid column name" appears when trying to save the information link.
Environment
Spotfire Information Services / Information Links
Resolution
Removing the blank space in the beginning of the column names in the database will solve the issue.
Note: Spotfire Data Connectors don't truncate column names like this. If changing the column name is not an option, one workaround could be to use a data connector instead of information link, or to create a database view with column names without leading/trailing spaces.