Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Question about string lookups in MS-SQL

  1. #1
    Join Date
    Jun 2014
    Posts
    25

    Default Question about string lookups in MS-SQL

    I'm reading in a text file and doing a sql lookup on one of the fields that is defined as String.
    I'm trimming the field and it typically has 8-20 characters and defining the length as 255 on the text file input.



    The key I'm looking up is defined as varchar(255) on the data base.
    Our DBA was reviewing the activity on the server and noted that in the query the lookup is coming as nvarchar(4000).

    I'm using sqljdbc4.jar for the drive rand currently pdi-cd-7.0.0.0-25 - though I will be upgrading to 8 shortly.

    Is there a way to limit the size of what the sql query will be using or have it use nvarchar(255)?

    Thanks.

  2. #2

    Default

    Hi,
    Did you ever find out why PDI is using nvarchar(4000) on lookups (and updates)?
    Thanks

  3. #3
    Join Date
    Jun 2014
    Posts
    25

    Default

    No I didn't.

  4. #4

    Default

    In the SQL Server JDBC connection, you need to add a parameter called 'sendStringParametersAsUnicode' with a value of 'false'.

    The JDBC driver defaults to sending any String values as nvarchar to the server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.