Hi @jasonmiciano – thanks for posting this! I've been working through the same issue for the past couple of days and really appreciate your insights.
I'm also using DAP 1.4.0 with MSSQL Server and have encountered similar problems, especially with the `groups` and `group_categories` tables.
In my case, around **44 tables** consistently fail when running `dap syncdb --tables all`. Oddly, many of these will sync successfully when I run `dap syncdb` **individually** for each table. (They will fail if I list out the tables with the command, e.g. '--tables groups,late_policies,learning_outcome_groups' etc.
To work around this, I rewrote my Python script to:
1. Attempt to sync all tables by namespace;
2. Capture any failed tables into a dictionary (tables by namespace);
3. Loop through those failed tables and run `dap syncdb` on them individually.
This significantly improved the table sync success rate — though it's clearly a workaround and not a long-term solution.
Here’s a list of tables that have been regularily failing for me by namespace:
{
"canvas": [
"group_categories",
"group_memberships",
"groups",
"late_policies",
"learning_outcome_groups",
"learning_outcome_question_results",
"learning_outcome_results",
"learning_outcomes",
"lti_line_items",
"lti_resource_links",
"lti_results",
"master_courses_child_content_tags",
"master_courses_child_subscriptions",
"master_courses_master_content_tags",
"master_courses_master_migrations",
"master_courses_master_templates",
"master_courses_migration_results",
"originality_reports",
"outcome_proficiencies",
"outcome_proficiency_ratings",
"post_policies",
"pseudonyms",
"quiz_groups",
"quiz_questions",
"quiz_submissions",
"quizzes",
"role_overrides",
"roles",
"rubric_assessments",
"rubric_associations",
"rubrics",
"score_statistics",
"scores",
"submission_comments",
"submission_versions",
"submissions",
"user_account_associations",
"users",
"web_conference_participants",
"web_conferences",
"wiki_pages",
"wikis"
],
"canvas_logs": [],
"catalog": [
"user_defined_fields",
"users"
]
}
```
I suspect the root issue may involve:
* Foreign key constraints (as you noted),
* MSSQL-specific datatype or schema translation issues,
* Or potential differences in resource handling (timeouts, transaction limits, etc.) between batch and individual syncs.
Happy to dig deeper and collaborate on identifying a more robust fix! until something can be done to make the sync more stable for MSSQL Server.