Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gouravd_7
Creator
Creator

How do i replace 2.000- to 2.000

Hi Team,

 

PLease help me to replace the numbers in table like 2.000- to -2.000 in talend job.

Please find the attached screenshot of the job.

 

Thanks,

Gourav Dubey 

Labels (2)
23 Replies
gouravd_7
Creator
Creator
Author

Hi Team,

 

I am still getting the same error 

 

 

[statistics] connecting to socket on port 3802
[statistics] connected
Exception in component tMSSqlInput_1 (quickcheck)
java.sql.SQLException: Value 2.000- cannot be converted to REAL.

 

Thanks & Regards,

Gourav Dubey

TRF
Champion II
Champion II

The expression mut be placed int o the tMap.

The job design must look like this:

tMSSqlInput --> tMap --> tMSSqlOutput

As the erro come from your tMSSqlInput_1 component, can you share its Settings?

TRF
Champion II
Champion II

The expression mut be placed int o the tMap.

The job design must look like this:

tMSSqlInput --> tMap --> tMSSqlOutput

As the error come from your tMSSqlInput_1 component, can you share its Settings?

Anonymous
Not applicable

Hi Gourav,

 

    Could you please share the screenshot of the tMSSQLInput component's schema? I am interested in the datatype you have added for this column in the schema.

 

Warm Regards,

 

Nikhil Thampi

gouravd_7
Creator
Creator
Author

Hi Team,

 

Attaching the job so that you can cross check the same. 

Also. I did the mapping of all 113 columns again and some how the issue with input component resolved and am getting this error now

Type mismatch cannot convert  from int to string.

 

Please find the attached zip file of the job and screenshot of the error where we are getting this issue 


newjob.zip
3.JPG
Anonymous
Not applicable

Hi,

 

    Could you please add column names in the select query and once they are added correctly, could you please try Guess schema?

 

    I believe you have missed some column in schema which is of integer type in source table.

 

0683p000009M0sR.png

 

 

 

Warm Regards,

 

Nikhil Thampi

TRF
Champion II
Champion II

You must CAST from Int to String into your query by yourself.

Example: 

SELECT CAST(yourIntColumn AS VARCHAR) from yourTable

 

Edit: you must CAST the numeric fields as soon as you want them into a String field 

 

Tip: to get the table schema without having to enter a complete SELECT, enter the query as "SELECT * FROM yourTable" then click the "Guess schema" to get the schema of the table and finally, click the "Guess query" to generate the corresponding SELECT statement (this suppose your SQL Server connection doesn't use context or global variables which are setted at runtime - in this case, use a dedicated component for design with the connection element hard coded and copy/past both resulting schema and query into the component included into your job)

gouravd_7
Creator
Creator
Author

Hi Team,

 

As per the instructions , I have added the columns with cast statements in the query mentioned in above mail chain still facing the same issue .

 

Thanks & Regards,

Gourav Dubey 


3.JPG
TRF
Champion II
Champion II

Your tMap output is String (for the fields where you want to remove the final "-") so it doesn't make sense to try to convert to Integer.

It's your responsability to clean up your job before to say "it doesn't work".

Anonymous
Not applicable

Hi Gourav,

 

      You seems to be changing at wrong area. @TRF has advised you to convert the integer columns to String within select statement and then onlyasking you to allocate to a STring data type in the schema mentioned in the tMSSQLInput component.

 

      If you have a integer data type in underlying database, you have two options.

 

a) convert them to string in SQL statement itself and pass it to string variables in the schema mentioned in tMSSQLInput component

or

b) allocate the column as integer datatype itself in both select statement and schema. If needed, convert to other data types later in your flow.

 

 

Warm Regards,

 

Nikhil Thampi