Skip to content


text file, schema file, and changing columns

kjjson asked 8 years ago
SmartConnect is being used to do regular imports from text files.  The issue is that the file regularly changes and there are additional columns, or the columns just change their order.  This causes issues when we try to import because in the schema file, the 5th column was "Customer ID", but now "Customer ID" is the 6th column, and the "Customer ID" field in the preview is the new 5th column.  Is there a way around this for it to go based on column names consistently, or do we need to change the file type, and if so, what is the best file type to use for this?  Thanks.
Best Answer
lorren answered 8 years ago
If the file name is not changing and you're not using a Folder Data Source you can change your data source to use ODBC and write the query to point to the file such as below.

SELECT * FROM [MyTextFile.txt]

When you select the ODBC Connection you would then select Text File as the ODBC Driver.
kjjson replied 8 years ago

Thanks, unfortunately the folder and name change on a monthly basis.

If you would like to submit an answer or comment, please sign in to the eOne portal.