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: 
JNGOULOU1662730615
Contributor
Contributor

ComponentException:SQL_ERROR:{message=Failed to read from stream

Exception in component tDBInput_2 (METROSCOPE_V04)

org.talend.components.api.exception.ComponentException: SQL_ERROR:{message=Failed to read from stream}

tContextLoad_1 set key "Emplacement_ini" with value "D:\ScriptMetroscope\Input"

tContextLoad_1 set key "Emplacement_Out" with value "D:\ScriptMetroscope\Output"

tContextLoad_1 set key "Date_Debut" with value "08/09/2022 15:00:00"

tContextLoad_1 set key "Date_Fin" with value "08/09/2022 15:10:00"

tContextLoad_1 set key "STEP" with value "10m"

tContextLoad_1 set key "SRV_PI_NAME" with value "DCEYY2Q2"

Exception in component tDBInput_2 (SCRIPT_METROSCOPE_V04)

org.talend.components.api.exception.ComponentException: SQL_ERROR:{message=Failed to read from stream}

  at org.talend.components.jdbc.CommonUtils.newComponentException(CommonUtils.java:572)

  at org.talend.components.jdbc.runtime.reader.JDBCInputReader.start(JDBCInputReader.java:213)

       at org.talend.codegen.flowvariables.runtime.FlowVariablesReader.start(FlowVariablesReader.java:73)

       at local_project.script_metroscope_v04_0_1.SCRIPT_METROSCOPE_V04.tIterateToFlow_1_AIProcess(SCRIPT_METROSCOPE_V04.java:7492)

       at local_project.script_metroscope_v04_0_1.SCRIPT_METROSCOPE_V04.tFileList_1Process(SCRIPT_METROSCOPE_V04.java:1846)

       at local_project.script_metroscope_v04_0_1.SCRIPT_METROSCOPE_V04.tFileInputDelimited_2Process(SCRIPT_METROSCOPE_V04.java:1233)

       at local_project.script_metroscope_v04_0_1.SCRIPT_METROSCOPE_V04.runJobInTOS(SCRIPT_METROSCOPE_V04.java:8850)

       at local_project.script_metroscope_v04_0_1.SCRIPT_METROSCOPE_V04.main(SCRIPT_METROSCOPE_V04.java:8654)

Caused by: java.sql.SQLException: Failed to read from stream

       at com.osisoft.jdbc.StatementImpl.getQueryReturnType(StatementImpl.java:345)

       at com.osisoft.jdbc.StatementImpl.executeQuery(StatementImpl.java:418)

       at org.talend.components.jdbc.runtime.reader.JDBCInputReader.start(JDBCInputReader.java:209)

       ... 6 more

Caused by: com.osisoft.rdsa.RdsaException: Failed to read from stream

       at com.osisoft.rdsa.Command.QueryReturnsResultSet(Native Method)

       at com.osisoft.rdsa.Command.queryReturnsResultSet(Command.java:93)

       at com.osisoft.jdbc.StatementImpl.getQueryReturnType(StatementImpl.java:340)

       ... 8 more

2022-09-09 12:13:48|Hbs6EB|Hbs6EB|Hbs6EB|LOCAL_PROJECT|SCRIPT_METROSCOPE_V04|Context|6|Java Exception|tDBInput_2|org.talend.components.api.exception.ComponentException:SQL_ERROR:{message=Failed to read from stream}|1

0695b00000UyxITAAZ.png

If any one have on idea for this problem...

Thanks , BR

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello,

Could you please try pass your PI_tag in Context value and use it in query instead of global variable?

The job design looks like:

Input-->tflowtoiterate-->tjavarow(context.PI_tag)

|

OnsubjobOk

tDBInput-->tfileoutputXXX

Any the Dynamic query a use in the tDBInput

 

"SELECT time,value,tag from piarchive..piavg WHERE tag IN "+context.PI_tag+"' AND time between '"+context.Date_Debut+"' AND '"+context.Date_Fin+"'

Feel free to let us know if it is OK with you.

Best regards

Sabrina

 

View solution in original post

2 Replies
JNGOULOU1662730615
Contributor
Contributor
Author

Here is a Dynamic query a use in the tDBInput

 

"SELECT time,value,tag from piarchive..piavg WHERE tag IN "+((String)globalMap.get("out1.PI_tag"))+" AND time between '"+context.Date_Debut+"' AND '"+context.Date_Fin+"'"

 

When I change the term "((String)globalMap.get("out1.PI_tag"))" with a string it's work...

Anonymous
Not applicable

Hello,

Could you please try pass your PI_tag in Context value and use it in query instead of global variable?

The job design looks like:

Input-->tflowtoiterate-->tjavarow(context.PI_tag)

|

OnsubjobOk

tDBInput-->tfileoutputXXX

Any the Dynamic query a use in the tDBInput

 

"SELECT time,value,tag from piarchive..piavg WHERE tag IN "+context.PI_tag+"' AND time between '"+context.Date_Debut+"' AND '"+context.Date_Fin+"'

Feel free to let us know if it is OK with you.

Best regards

Sabrina