You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running into errors when trying to use copy_dm_to() on a dm containing a table with a string field that could exceed 255 characters. Note that I am copying the dm to an MSSQL database.
The error was a SQL error reading: String or binary data would be truncated.
After some digging, I believe the issue stems from the line in build_copy_queries(), which reads: tbl <- tbl_impl(ptype_dm, x)
It seems that it's trying to use the table with 0 rows to inform the column definitions, but this will assume VARCHAR(255) for any strings, even if that column contains a value of greater than 255 characters.
When I updated the line on my end to instead point at dm instead of ptype_dm to read tbl <- collect(tbl_impl(dm, x)) this seemed to fix the issue.
The text was updated successfully, but these errors were encountered:
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
I was running into errors when trying to use
copy_dm_to()
on a dm containing a table with a string field that could exceed 255 characters. Note that I am copying the dm to an MSSQL database.The error was a SQL error reading: String or binary data would be truncated.
After some digging, I believe the issue stems from the line in
build_copy_queries()
, which reads:tbl <- tbl_impl(ptype_dm, x)
It seems that it's trying to use the table with 0 rows to inform the column definitions, but this will assume VARCHAR(255) for any strings, even if that column contains a value of greater than 255 characters.
When I updated the line on my end to instead point at
dm
instead ofptype_dm
to readtbl <- collect(tbl_impl(dm, x))
this seemed to fix the issue.The text was updated successfully, but these errors were encountered: