Pentaho PDI:字符串截断为 9,999,999 个字符,输出到 SQL Server 的 table_output。

huangapple go评论53阅读模式
英文:

Pentaho PDI: String truncated to 9.999.999 characters with table_output to sql server

问题

抱歉,以下是翻译好的部分:

"Hi I'm having some issue with long strings in combination with PDI and SQL Server...

I load a long string (+- 19M charactares) from postgresql server. (text field, no issues). When i try to immediatly insert the same field in a sql server field i get the message the field is truncated in the logs, and i see the field in sql server (varchar (max)) has only 9.999.999 characters.

Pentaho PDI:字符串截断为 9,999,999 个字符,输出到 SQL Server 的 table_output。

When i read the string after table_input it is still 19M characters long. The truncating seems to happen on the insert.

Does anyone know why this happens? It's my understanding the varchar(max) should be able to hold 2^31-1 bytes (2 GB).

Total transformation:
Pentaho PDI:字符串截断为 9,999,999 个字符,输出到 SQL Server 的 table_output。

英文:

Hi I'm having some issue with long strings in combination with PDI and SQL Server...

I load a long string (+- 19M charactares) from postgresql server. (text field, no issues). When i try to immediatly insert the same field in a sql server field i get the message the field is truncated in the logs, and i see the field in sql server (varchar (max)) has only 9.999.999 characters.

Pentaho PDI:字符串截断为 9,999,999 个字符,输出到 SQL Server 的 table_output。

When i read the string after table_input it is still 19M characters long. The truncating seems to happen on the insert.

Does anyone know why this happens? It's my understanding the varchar(max) should be able to hold 2^31-1 bytes (2 GB).

Total transformation:
Pentaho PDI:字符串截断为 9,999,999 个字符,输出到 SQL Server 的 table_output。

答案1

得分: 0

PDI在table_output步骤中对于任何类型的文本有一个9,999,999字符的限制,据我所见在他们的文档中并未提到这一点。通过其他方式插入,例如在Pentaho中使用Python脚本似乎可以解决这个问题。

英文:

It seems PDI has a limitation in the table_output step of 9.999.999 characters for any kind of text which as far as i can see has not been mentioned in their documentation. Inserting via other means, for example a python script in pentaho does seem to do the trick.

huangapple
  • 本文由 发表于 2023年6月27日 19:15:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76564301.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定