SIS Import of enrollment file

583 views
Skip to first unread message

David Pinto

unread,
Jul 20, 2011, 10:13:29 AM7/20/11
to Canvas LMS Users
In my first canvas import, I made a mistake in the enrollment file,
using a column header of sectionid instead of section_id. The file
imported with no problems. In a subsequent run of the data, I fixed
the error. However, with the error fixed, the file would not import,
giving me an error message indicating a non-existent section.

I'm using a test environment right now, so this isn't that big a
deal. I assume when I go over to the production environment it will
work fine with section_id as the header. This did cause me a great
deal of work trying to figure out the problem, since the data was
exactly the same.

Tom Metge

unread,
Jul 20, 2011, 10:50:45 AM7/20/11
to canvas-l...@googlegroups.com
The thing to keep in mind is that Canvas uses that "section_id" field as a foreign key (speaking in database terms)- that field is how it maps what resides in Canvas to what is described in your CSV files.  This is why Canvas complained on your second import that the sections didn't exist: it doesn't matter what they're named, Canvas will use that "section_id" column to map the contents of the CSV file to what Canvas has stored.  Since the previous import didn't include that information, it couldn't find the specified sections.

Once you've finalized the creation process for your CSV files (including the "section_id" column), you shouldn't run into these types of problems again.

t

David Pinto

unread,
Jul 20, 2011, 12:34:16 PM7/20/11
to canvas-l...@googlegroups.com
So should I leave out section_id entirely, since I'm not using sections?  I was just sending empty strings for fields I didn't use.

JT Olds

unread,
Jul 20, 2011, 12:36:59 PM7/20/11
to canvas-l...@googlegroups.com
A blank string for section_id in the enrollments.csv file should be
fine, but you will need at least a section_id or a course_Id.

It's recommended you use section_ids instead of course_ids, as that's
what Canvas puts enrollments on internally.

If you are getting a section_id error on a blank section_id when a
course_id is provided in the enrollments.csv file, then that sounds
like a bug.

Note that Canvas does not use filenames to figure out which CSV is
being imported, but uses CSV headers instead. If you are getting such
an error, perhaps you have left out some other necessary columns and
Canvas thinks this is a different CSV file?

Glen Parker

unread,
Jul 20, 2011, 12:57:10 PM7/20/11
to canvas-l...@googlegroups.com
Canvas doesn't use the filename? So I could have two enrollments
files, enrollments_fall_2011.csv and enrollments_spring_2012.csv, and
both would be processed? That's great news, someone should add that
tidbit to the SIS Import PDF.

What happens if I eventually run one or more of those files with the
checkbox checked? I forget the term used, but it's the mode where
records missing from teh feed files are deleted from the database.
Will Canvas concatenate the various enrollment files and then delete
the missing records, or will it process and delete records in turn,
leaving only records from the last file in line to be processed?

Thanks, Glen

JT Olds

unread,
Jul 20, 2011, 1:06:05 PM7/20/11
to canvas-l...@googlegroups.com
Yes, enrollments_fall_2011.csv and enrollments_spring_2012.csv in the
same zip should work fine.

If you have the "batch mode" option checked, old data is not deleted
if it is touched by the current batch, regardless of how many CSVs you
submit in the zip file.

So, for all intents and purposes, Canvas concatenates the various
enrollment files.

JT Olds

unread,
Jul 20, 2011, 1:06:49 PM7/20/11
to canvas-l...@googlegroups.com
And yes, this should be better documented. I'll make a note to do so shortly.

David Pinto

unread,
Jul 20, 2011, 1:29:29 PM7/20/11
to canvas-l...@googlegroups.com
I removed all blank fields from my import, and it worked just fine (and ran much faster).  So my enrollments header now looks like:

course_id,user_id,role,status

Since we don't use sections at our school, I was told I don't need to bother with the sections table.  You seem to be indicating that's not the best practice.

David

On Wed, Jul 20, 2011 at 12:36 PM, JT Olds <j...@instructure.com> wrote:

JT Olds

unread,
Jul 20, 2011, 1:31:27 PM7/20/11
to canvas-l...@googlegroups.com
Well no that's fine, but just so you know, Canvas actually creates a
default section for courses that you don't provide a section for.
Enrollments happen on that section.

David Pinto

unread,
Jul 20, 2011, 1:41:15 PM7/20/11
to canvas-l...@googlegroups.com
That's fine.  Thanks for your help.
Reply all
Reply to author
Forward
0 new messages