dotnet / dotnet/machinelearning-modelbuilder
Large Text Data in SQL causes IndexOutOfRangeException on Add Data step when trying to preview the data
- Dominant language
- Dockerfile
- Stars
- 285
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
**System Information (please complete the following information):**
- Windows Version: 10.0.19045 Build 19045
- Model Builder Version (available in Manage Extensions dialog): 17.16.0.2326802
- Visual Studio Version: 17.4.3
- SQL Server Version: 16.0.1050.5
**Describe the bug**
- On which step of the process did you run into an issue: Add data
- Clear description of the problem: After connecting to the SQL Server and selecting a database, I selected my model table. When it tried to load the data for preview, it triggered the following exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at StreamJsonRpc.JsonRpc.d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.Actions.DataTextActions.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.Actions.DataTextActions.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.ToolWindows.TextDataControl.<>c__DisplayClass4_0.<b__0>d.MoveNext()
**To Reproduce**
Steps to reproduce the behavior:
1. Create a dataset table in SQL Server with one integer Id, and two String fields
2. Fill the dataset with very long strings (scraped website page data in my case, max length 41,052 characters)
3. Try to use the Model Builder to map to this data
4. See error
**Expected behavior**
The preview should appear with truncated versions of the long text instead of an error dialog. Alternately, if it can't handle data of this length, it should properly inform the user of this limitation.
**Screenshots**
N/A
**Additional context**
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.