Rather than reading the entire file into the dataset I would use .next() to read the file line by line, evaluate if the date is within your parameters, and if so append to a dataset. After the file is parsed, convert the dataset to PyDataSet and use a for loop to run system.db.runPrepUpdate for each record. Here are some good resources:
1 Like