Skip to content

Conversation

@Charles-Gagnon
Copy link
Contributor

Was investigating an issue and found a couple places we could improve debug logging :

  1. Case sensitivity/collation retrieved from database
  2. Listing the object column names in addition to the table columns (since we use the object columns to generate the merge query)
  3. The query executed for each merge/insert statement

I also wrapped the exception thrown if an error occurs upserting the rows to provide a bit more context - before it would just give the direct exception that occurred (usually some generic SqlClient error) which doesn't tell the user where the issue might have come from. At least with this it should make it clearer where it happened which can help track it down.

@Charles-Gagnon Charles-Gagnon merged commit 6d8891d into main Nov 14, 2022
@Charles-Gagnon Charles-Gagnon deleted the chgagnon/loggingImprovements branch November 14, 2022 17:01
PBBlox pushed a commit to PBBlox/azure-functions-sql-extension that referenced this pull request Apr 6, 2025
* Upsert logging improvements

* case sensitive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants