<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Schema from sql query ... in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338479#M106709</link>
    <description>Hi Pedro, 
&lt;BR /&gt;Thankyou very much for your replies. 
&lt;BR /&gt;It seemed that TMSSqlInput was component item I wanted if I wanted it to provide data on to the next part of the process. I got this to work (and with a complex sql) but it seemed I had to setup the schema manually. It seems that tMSSqlRow is for running statements that act on the db structure or on the data? 
&lt;BR /&gt;The guess schema button doesn't work for me with simple sql or with tables either ... even though I've installed Talend again and most recent version of Java. (I can use a server rather than my notebook and might switch to doing that ..) 
&lt;BR /&gt;Online help for tMSSqlRow indicates: 
&lt;BR /&gt;tMSSqlRow acts on the actual DB structure or on the data 
&lt;BR /&gt;The row suffix means the component implements a flow in the job design although it doesn?t provide output. 
&lt;BR /&gt;regards, thanks, Allan</description>
    <pubDate>Mon, 27 Feb 2012 06:59:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-02-27T06:59:55Z</dc:date>
    <item>
      <title>Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338474#M106704</link>
      <description>Hi, 
&lt;BR /&gt;I'm wondering how to do a few things. 
&lt;BR /&gt;I can setup a new database connection and create a Query. 
&lt;BR /&gt;I can drag this query to a process as a tMSSqlInput object. 
&lt;BR /&gt;When I choose the "Guess schema" button option I get this message: 
&lt;BR /&gt;"Connection error - Connect to DB error, or dome errors in SQL query string, ir 'Guess Schema' not compatible with current SQL query string." 
&lt;BR /&gt;I would like to be able to obtain the schema from a query ... 
&lt;BR /&gt;Maybe I shoudl try re-install of TOS 5.0.1? Have T.I.S. also. I could try this .. 
&lt;BR /&gt;Is it possible to have a complex query as an input to a process (rather than a table?) 
&lt;BR /&gt;Should I expect Talend to be able to generate a schema from a complex sql ? 
&lt;BR /&gt; 
&lt;BR /&gt;Query is re. MS SQL*Server database and is as per: 
&lt;BR /&gt; 
&lt;BR /&gt;SELECT 
&lt;BR /&gt; "MCS-Santos_PDDB"."Well Name", 
&lt;BR /&gt; "MCS-Santos_PDDB".UWI, 
&lt;BR /&gt; "MCS-Santos_PDDB"."Well Status", 
&lt;BR /&gt; cast(floor(cast("MCS-Santos_PDDB".Date as float)) as datetime) as test_date, 
&lt;BR /&gt; "MCS-Santos_PDDB"."User", 
&lt;BR /&gt; max( 
&lt;BR /&gt; case 
&lt;BR /&gt; when PATINDEX('%PRODUCTION CASING PRESSURE%',upper(Instrument)) &amp;gt; 0 then "MCS-Santos_PDDB"."Reading value" 
&lt;BR /&gt; end ) as PRODUCTION_CASING_PRESSURE, 
&lt;BR /&gt; max( case 
&lt;BR /&gt; when PATINDEX('%INTERMEDIATE CASING PRESSURE%',upper(Instrument)) &amp;gt; 0 then "MCS-Santos_PDDB"."Reading value" 
&lt;BR /&gt; end) as INTERMEDIATE_CASING_PRESSURE, 
&lt;BR /&gt; max( case 
&lt;BR /&gt; when PATINDEX('%SURFACE CASING PRESSURE%',upper(Instrument)) &amp;gt; 0 then "MCS-Santos_PDDB"."Reading value" 
&lt;BR /&gt; end ) as SURFACE_CASING_PRESSURE, 
&lt;BR /&gt; max( case 
&lt;BR /&gt; when (PATINDEX('%TUBING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt; and PATINDEX('%L',upper("Well Name")) &amp;gt; 0) 
&lt;BR /&gt; then "MCS-Santos_PDDB"."Reading value" 
&lt;BR /&gt; end ) as LOWER_STRING_PRESSURE, 
&lt;BR /&gt; max( case 
&lt;BR /&gt; when (PATINDEX('%TUBING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt; and PATINDEX('%U',upper("Well Name")) &amp;gt; 0) 
&lt;BR /&gt; then "MCS-Santos_PDDB"."Reading value" 
&lt;BR /&gt; end ) as UPPER_STRING_PRESSURE, 
&lt;BR /&gt; max( case 
&lt;BR /&gt; when (PATINDEX('%TUBING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt; and not PATINDEX('%U',upper("Well Name")) &amp;gt; 0 
&lt;BR /&gt; and not PATINDEX('%L',upper("Well Name")) &amp;gt; 0 
&lt;BR /&gt; ) 
&lt;BR /&gt; then "MCS-Santos_PDDB"."Reading value" 
&lt;BR /&gt; end ) as SINGLE_STRING_PRESSURE 
&lt;BR /&gt;FROM "MCS-Santos_PDDB" 
&lt;BR /&gt;WHERE 
&lt;BR /&gt; PATINDEX('%PRODUCTION CASING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt;Or PATINDEX('%INTERMEDIATE CASING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt;Or PATINDEX('%SURFACE CASING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt;Or PATINDEX('%TUBING PRESSURE%',upper(Instrument)) &amp;gt; 0 
&lt;BR /&gt;group by 
&lt;BR /&gt; "MCS-Santos_PDDB"."Well Name", 
&lt;BR /&gt; "MCS-Santos_PDDB".UWI, 
&lt;BR /&gt; "MCS-Santos_PDDB"."Well Status", 
&lt;BR /&gt; cast(floor(cast("MCS-Santos_PDDB".Date as float)) as datetime), 
&lt;BR /&gt; "MCS-Santos_PDDB"."User"</description>
      <pubDate>Sat, 16 Nov 2024 12:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338474#M106704</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338475#M106705</link>
      <description>Hi &lt;BR /&gt;If you want to execute complex query like above, you'd better use tMSSQLRow instead ot tMSSQMInput.&lt;BR /&gt;tMSSQLRow--&amp;gt;tParseRecordSet--&amp;gt;Output Components&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 24 Feb 2012 03:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338475#M106705</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-24T03:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338476#M106706</link>
      <description>Issue with TOS 5.0.1 
&lt;BR /&gt;Having a problem using the "Guess Schema" button on a tOracleInput component. (on all tOracleInput components). 
&lt;BR /&gt;The error message reads: Connection error: Connect to DB error, or some errors in SQL query string, or 'Guess Schema' not compatible with current SQL query string. 
&lt;BR /&gt;This is a working process and co-worker can use the "Guess Schema" option wth the same component on the same job. 
&lt;BR /&gt;I have tried installing most recent version of Oracle and also installing new version of TOS on notebook.</description>
      <pubDate>Mon, 27 Feb 2012 04:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338476#M106706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-27T04:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338477#M106707</link>
      <description>minor issue:&lt;BR /&gt;TOS 5.0.1 | Help about Talend Studio has a button called "Installation Details". This button gives message as per:&lt;BR /&gt;An internal error occurred during: "Fetching children of _SELF_".&lt;BR /&gt;java.lang.NullPointerException</description>
      <pubDate>Mon, 27 Feb 2012 04:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338477#M106707</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-27T04:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338478#M106708</link>
      <description>Hi&lt;BR /&gt;Sometimes when you edit a query which is so complicated and some columns don't exist in this DB table, "Guess Scheme" will get this error.&lt;BR /&gt;I think this issue is due to the query you type.&lt;BR /&gt;As I said in previous post, if you want to use complex query, tMSsqlRow is preferred.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Mon, 27 Feb 2012 05:19:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338478#M106708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-27T05:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338479#M106709</link>
      <description>Hi Pedro, 
&lt;BR /&gt;Thankyou very much for your replies. 
&lt;BR /&gt;It seemed that TMSSqlInput was component item I wanted if I wanted it to provide data on to the next part of the process. I got this to work (and with a complex sql) but it seemed I had to setup the schema manually. It seems that tMSSqlRow is for running statements that act on the db structure or on the data? 
&lt;BR /&gt;The guess schema button doesn't work for me with simple sql or with tables either ... even though I've installed Talend again and most recent version of Java. (I can use a server rather than my notebook and might switch to doing that ..) 
&lt;BR /&gt;Online help for tMSSqlRow indicates: 
&lt;BR /&gt;tMSSqlRow acts on the actual DB structure or on the data 
&lt;BR /&gt;The row suffix means the component implements a flow in the job design although it doesn?t provide output. 
&lt;BR /&gt;regards, thanks, Allan</description>
      <pubDate>Mon, 27 Feb 2012 06:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338479#M106709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-27T06:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Schema from sql query ...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338480#M106710</link>
      <description>Hi Allan 
&lt;BR /&gt;I don't know why "guess schema" doesn't work for you with simple sql or tables. 
&lt;BR /&gt;I need more details, such as query, structure of DB table. Or just a screenshot. 
&lt;BR /&gt;In fact tMSsqlRow can propagate output. tMSSQLRow--&amp;gt;tParseRecordSet--&amp;gt;Output Components 
&lt;BR /&gt;Check Advanced settings "Propagate QUERY's recordset" of tMSSQLRow. 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Pedro</description>
      <pubDate>Mon, 27 Feb 2012 07:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Schema-from-sql-query/m-p/2338480#M106710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-27T07:36:17Z</dc:date>
    </item>
  </channel>
</rss>

