warning : schema is different from the query

One Star

warning : schema is different from the query

I think that this is bugs...
step1. plz, create table
CREATE TABLE ZZ$BUG
(
START_DATE VARCHAR2(8 BYTE)
)
step2. create new job
step3. Drop the following components from the Palette onto the design workspace : tOracleInput, tOracleOutput
step4. Connect tOracleInput to tOracleOutput using a Row Main link.
step5. In the design workspace, select tOracleInput
and click the Component tab to define its basic settings.
and in the Query field, input this sql
-- sql
"
SELECT TO_CHAR(TO_DATE(START_DATE,'YYYYMMDD')-1,'YYYYMMDD')
FROM ZZ$BUG
"

then, you can see.
"warning : schema is different from the query"
of course, if Press F6 then execute it
and this job result is success.
just, i see "the waring icon!! "

is it bugs??
how is it fixed??
Moderator

Re: warning : schema is different from the query

Hi,
The warning message shows the query is different from the schema, for example, if we define two columns:id and name on the schema, but the query select one or more than two fields like:
"select id, name, age from person"
then, the warning appears. The component always split the query to fields by comma. In this case, the component consider the query select two fields, but there is only column on the schema. That's why the warning appears, anyway, the job works fine, don't take care about it.

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: warning : schema is different from the query

if Talend cannot see "TO_CHAR(TO_DATE(START_DATE,'YYYYMMDD')-1,'YYYYMMDD')" as a single field result to compare with the schema of one fields, then this truly is a bug. I have the same issue with queries that have complex formulas with commas. If Talend can "Guess schema" correctly and produce the correct number of fields, then Talend can correctly count the number of fields it has just created in "Guess schema". Your explanation admits there is a bug. I am also ignoring the warning, but it would be nice to only have warnings when there is a real problem.
Moderator

Re: warning : schema is different from the query

Hi, dgreen
Thanks for your question. It is welcome to open a jira issue of DI project on jira bug for your concern. Our developer will check it to see if there is any better optimistic solution.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.