fluent / fluent/fluent-plugin-sql

Casting issue for output configuration

Abierto
#141 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug needs-investigation
Lenguaje dominante
Ruby
Estrellas
112
Forks
58
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I'm having an issue pushing data into SQL Server using this plugin. It seems the only issue I'm having is the first column, which is configured as a unique identifier in both my source and destination databases, is being cast to an int or bigint when trying to ingest. I've checked my data being pulled from my source plugin and it is correct, it seems as though this plugin has some casting issue when using output configuration.

{"time":"2023-10-24T21:28:29","level":"warn","message":"Got deterministic error. Fallback to one-by-one import error_class_ActiveRecord::StatementInvalid error=\"TinyTds::Error: Conversion failed when converting from a character string to uniqueidentifier.:INSERT INTO [table1] ([id],[status],[ident]) VALUES ('1',N'Status1',1); SELECT CAST(SCOPE_IDENTITY() AS bigint) AS Ident\"","work_id:0}

If anyone has seen or knows a workaround for this that would be greatly appreciated.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by reproducing the SQL Server destination case described in the output configuration, using a uniqueidentifier first column and the logged INSERT statement. Trace where the output builds the INSERT and adds SELECT CAST(SCOPE_IDENTITY() AS bigint) AS Ident, then verify that the identifier is preserved without an incompatible cast and add coverage for this case if the repository has matching tests.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
ruby, sql
Área
backend, databases
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.