Recently, I ran an import script to import a delimited file into ACL, but the last 10 fields were not imported. And I didn’t know it right away, because I received no error message.
In addition (or should I say, in subtraction), the log did not indicate anything was wrong. When I manually imported the file, everything was fine. I copied the log and created an import script.
When I was created another script to do some analysis, I realized I forgot to change some fields to datetime format so that they would display a date like 01/01/2014. So I tweaked the import script to format those fields as date fields.
Then I reran the import script and thought all was fine. When I started running the analysis script, I noticed my table was missing some fields. My analysis script kept telling me a couple fields were invalid (the message said something like “field might have been misspelled”).
When I displayed the table layout, the fields were missing. However, the fields were included in the import script. I ran the script again and the fields were still missing.
After too much time and frustration passed as I tried to figure out the problem, I noted the last field that DID appear in the table. Then I reviewed that field in the import script. It was fine.
Then I noticed the next field had an extra quote in it (see yellow highlight):
Then I looked at the table layout. Notice the “Title” column in the red box below contains format information instead of a title, with a trailing quote. That is why the script died quietly on this field and refused to import this field or any field after it.
So I removed the extra quote in the script, and it ran like a champ.
Not Just Delimited
Just for fun, I tested this on other file formats besides delimited files by adding an extra quote in a similar spot in other import scripts. The same problem occurs with text files, and most likely all other formats. So scripter beware.
So my 2 takeaways:
- Sometimes ACL doesn’t tell you when an error occurs, not to your face, and not in the log. That’s bad. It appears that the program does not check the format sections of the script for proper syntax.
- Be more careful in editing scripts.
Anyone else run into this?
For all my posts, ACL or not, see Written by skyyler.