In the workspace I have a geometry extractor transformer, which outputs OGC Well Known Binary format.
After geometry extractor, SQL server non spatial writer follows. In the writer, the WKB field is defined as the varbinary (width 8000) type.
In an SQL server database, this field is defined as a varbinary (MAX) data type.
All translations went smoothly in the latest FME Workbench 2021 version.
However, in version 2022, it does not work. I tried different data type combinations for sql server writer and for database, however without success.
1. case
writer data type: database data type:
varbinary (8000) varbinary(MAX)
Microsoft SQL Server Non-Spatial Writer: Attribute 'abc' of feature type 'xyz' has specified type 'varbinary(8000)', but existing database table field has type 'varbinary_max'. Information may be lost during conversion.
Microsoft SQL Server Non-Spatial Writer: Attribute data '\\x01\\x03\\x00\\x00\\x0\\x95\\xAC!AR\\xB8\\x1EU\\ ... ' too large to fit in specified data type for column.
No data is written.
2. case
writer data type: database data type:
varbinary_max varbinary(MAX)
Microsoft SQL Server Non-Spatial Writer: Attribute 'abc' of feature type 'xyz' has specified type `varbinary(max)', but existing database table field has type `varbinary_max'. Information may be lost during conversion.
Microsoft SQL Server Non-Spatial Writer: Attribute data '\\x01\\x03\\x00\\x00\\x00\\x01\\x00\\x00\\x00$\\ ...' too large to fit in specified data type for column.
No data is written.
3. case
writer data type: database data type:
varbinary (8000) varbinary(8000)
Microsoft SQL Server Non-Spatial Writer: Attribute data '\\x01\\x03\\x00\\x00\\x00\\x01\\x00\\x00\\x00$\\ ...' too large to fit in specified data type for column.
Only enough small data is written.
4. case
writer data type: database data type:
varbinary_max varbinary(8000)
Microsoft SQL Server Non-Spatial Writer: Attribute data '\\x01\\x03\\x00\\x00\\x00\\x01\\x00\\x00\\x00$\\ ...' too large to fit in specified data type for column.
Only enough small data is written.
I do not have a license to use SQL Server spatial data writer, so I do the conversion to WKB and write it to the SQL server database.
Therefore, in short, how to write WKB data to sql server table, with FME Workbench 2022.
Thanks;