Skip to main content
Solved

Index was outside the bounds of the array


amartinez
Explorer

Hi team,

I’m facing the following issue when Multiple Text File connector to pull in *.TXT files. I’m getting the following error “Index was outside the bounds of the array” when i execute table in the ODX.

 

 

 

 

Best answer by Thomas Lind

Hi @amartinez 

You will get this for any field that is longer than what you set as the data type, it will not tell you what field this is, so there are a few ways to figure out what to do.

You set all fields to nvarchar(4000) and synchronize and see if it goes through.

If it is a delimiter issue as suggested by Rory, it may not be enough as it has a max character limit of 4000 in one field, so then your only option is to manually look at the file to see if you can locate the issue or create a CData CSV data source and point to the same file with that. If you have set the row scan depth to 0 it will read the whole file before determining the data types and it should be easier to see what fields gives issues.

View original
Did this topic help you find an answer to your question?

6 replies

rory.smith
TimeXtender Xpert
Forum|alt.badge.img+7
  • TimeXtender Xpert
  • 649 replies
  • October 26, 2023

Hi @amartinez ,

 

could it be that your text files contain either the field delimiter or row delimiter inside a field somewhere? Does it fail for all files or only one or a few?

 


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • Answer
  • October 26, 2023

Hi @amartinez 

You will get this for any field that is longer than what you set as the data type, it will not tell you what field this is, so there are a few ways to figure out what to do.

You set all fields to nvarchar(4000) and synchronize and see if it goes through.

If it is a delimiter issue as suggested by Rory, it may not be enough as it has a max character limit of 4000 in one field, so then your only option is to manually look at the file to see if you can locate the issue or create a CData CSV data source and point to the same file with that. If you have set the row scan depth to 0 it will read the whole file before determining the data types and it should be easier to see what fields gives issues.


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

@amartinez can you please send some dummy files with non-sensitive data?


amartinez
Explorer
  • Author
  • Explorer
  • 5 replies
  • October 30, 2023

Thanks for the suggestions. Tab delimited text file is a bit tricky and will run into all sorts of issues due to length and amount of characters. I'm still working working on getting this to work, but will share with the community once I figure it out.


amartinez
Explorer
  • Author
  • Explorer
  • 5 replies
  • October 30, 2023
Christian Hauggaard wrote:

@amartinez can you please send some dummy files with non-sensitive data?

Sure thing. Let me scramble some of the data and I will send it over to you. 


Christian Hauggaard
Community Manager
Forum|alt.badge.img+5

@amartinez have you had a chance to scramble the files? 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings