MSSQL connector fails to preview or import tables containing a `TIMESTAMP`/`ROWVERSION` column
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Locate the MSSQL connector code that generates SELECT queries for table preview and import. The error shows the connector implicitly converts TIMESTAMP/ROWVERSION to nvarchar(max), which SQL Server forbids. Modify the query generation to handle this data type—cast to VARBINARY or skip the conversion. Test with the reproduction table to confirm the fix.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- Microsoft Data Formulator running in Docker
- Ubuntu Server 24.04
- Microsoft SQL Server 2022
- MSSQL Python driver (
mssql_python, as shown in the application log)
Description
When I try to preview or import a SQL Server table that contains a TIMESTAMP column, the operation fails. In SQL Server, TIMESTAMP is a synonym for ROWVERSION—it stores a binary row version, not a date or time.
Minimal reproduction
CREATE TABLE dbo.Repro (
Id int NOT NULL PRIMARY KEY,
RowVersionColumn timestamp NOT NULL,
SysStartTime datetime2(7) GENERATED ALWAYS AS ROW START NOT NULL,
SysEndTime datetime2(7) GENERATED ALWAYS AS ROW END NOT NULL,
PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime)
)
WITH (
SYSTEM_VERSIONING = ON (
HISTORY_TABLE = dbo.ReproHistory
)
);
- Connect Data Formulator to the SQL Server database.
- Select
dbo.Repro. - Try to preview or import the table.
Expected behavior
The table should be previewed and imported successfully, with the ROWVERSION column handled as binary data or otherwise handled safely.
Actual behavior
Both preview and import fail with a data-load error. The SQL Server driver reports:
Invalid character value for cast specification;
[Microsoft][SQL Server] Explicit conversion of the timestamp data type
to nvarchar(max) is not allowed.
The error occurs while executing the generated SELECT query.
- Ngôn ngữ chính
- Python
- Star
- 17.7k
- Fork
- 1.7k
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/data-formulator
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
microsoft/data-formulator#513 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/data-formulator#520 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
microsoft/data-formulator#519 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Data table is emptyĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
microsoft/data-formulator#518 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
microsoft/data-formulator#517 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/data-formulator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Treat corrupt-shape state files as missing in `load_state`Có thể đã có người làm @Qrytics đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
OvertureMaps/overturemaps-py#175 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
awslabs/visual-asset-management-system#1278 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aws-samples/sample-per-model-bedrock#835 ·
Maintainer thường phản hồi trong vòng 1 ngày