Anaplan Connect - Put file gives Array Index Out of Bounds
I am having some issues with running one of my Anaplan Connect scripts to import a file & run a process.
When trying to upload the file, I receive an error "Array Index Out of Bounds: 0".
When I run the process from the Anaplan website and import the same file there, it works perfectly.
When I run the script, using only the first 3 lines of the file as input file, the script also runs perfectly. My guess is that the issue is with the input file, but I cannot figure out what the problem would be.
The input file is attached. Below you can also find a copy of the script:
set AnaplanUser="userid:pw" set WorkspaceId="workspaceID" set ModelId="ModelID" set ServiceUrl="https://api.anaplan.com" set AuthUrl="https://auth.anaplan.com" set FileName="ANA_Mat_Plant_Attr.csv" set FilePath="...\ANA_Mat_Plant_Attr.csv" set DumpName="dump/path/here" set Chunksize=1
How is your source file delimitted is it similar to the other script's source file? One other item I would check is the chunk size when you are uploading to anaplan connect, it might be worth increasing it.
Thanks so much for your suggestions. I think I may be getting close. Both source files are delimited with "|". I have increased the chunksize to 50, but I'm still getting the Array index out of bounds error. The problem does seem to be the source file though. It was 23K lines, so I deleted 8K and the error disappeared. I think I will try validating the data in the 8K . . . unless you have any other suggestions.
I ran into this issue this week and raised a support ticket. The source of the error was the use of more than one delimiter in the file definition. This seems to be a known issue with Anaplan Connect V1.4.x.
To correct the issue update your file definition, Imports > Import Data Sources, and change delimiter selection so that you only use a single delimiter.