Route Attribute - Database down

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Route Attribute - Database down

KhajaAsmath Mohammed
Hi,

How can I capture the execution error on executesql and route it to different queue when there is failure on the database. 

executesql.error.message = 'com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sap://hana-xxxxxx:30041 [Cannot connect to host hanaxxx:30041 [Connection refused (Connection refused)], -813.].' 
   
Thanks,
Asmath
Reply | Threaded
Open this post in threaded view
|

Re: Route Attribute - Database down

Luis Carmona

HI,

I have done that with PostgreSQL and MSSQL, and it comes in the answer read by ExecuteSQL.

Maybe I am not understanding your question. If you like please send more details.

LC



El jue, 11-06-2020 a las 12:11 -0500, KhajaAsmath Mohammed escribió:
Hi,

How can I capture the execution error on executesql and route it to different queue when there is failure on the database. 

executesql.error.message = 'com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sap://hana-xxxxxx:30041 [Cannot connect to host hanaxxx:30041 [Connection refused (Connection refused)], -813.].' 
   
Thanks,
Asmath
Reply | Threaded
Open this post in threaded view
|

Re: Route Attribute - Database down

KhajaAsmath Mohammed
Yes , you are right Luis. It comes in executesql processor. 

Sent from my iPhone

On Jun 11, 2020, at 11:41 PM, Luis <[hidden email]> wrote:



HI,

I have done that with PostgreSQL and MSSQL, and it comes in the answer read by ExecuteSQL.

Maybe I am not understanding your question. If you like please send more details.

LC



El jue, 11-06-2020 a las 12:11 -0500, KhajaAsmath Mohammed escribió:
Hi,

How can I capture the execution error on executesql and route it to different queue when there is failure on the database. 

executesql.error.message = 'com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sap://hana-xxxxxx:30041 [Cannot connect to host hanaxxx:30041 [Connection refused (Connection refused)], -813.].' 
   
Thanks,
Asmath
Reply | Threaded
Open this post in threaded view
|

Re: Route Attribute - Database down

Matt Burgess-2
Although the error attribute can help as a workaround, counting on a
text value is probably not the best option (although it's pretty much
all we have for now). I wrote up NIFI-7524 [1] to add a "retry"
relationship to ExecuteSQL like we have for PutSQL and
PutDatabaseRecord. It would route things like "Connection refused" to
retry rather than failure.

Regards,
Matt

[1] https://issues.apache.org/jira/browse/NIFI-7524

On Thu, Jun 11, 2020 at 2:49 PM KhajaAsmath Mohammed
<[hidden email]> wrote:

>
> Yes , you are right Luis. It comes in executesql processor.
>
> Sent from my iPhone
>
> On Jun 11, 2020, at 11:41 PM, Luis <[hidden email]> wrote:
>
> 
>
> HI,
>
> I have done that with PostgreSQL and MSSQL, and it comes in the answer read by ExecuteSQL.
>
> Maybe I am not understanding your question. If you like please send more details.
>
> LC
>
>
>
> El jue, 11-06-2020 a las 12:11 -0500, KhajaAsmath Mohammed escribió:
>
> Hi,
>
> How can I capture the execution error on executesql and route it to different queue when there is failure on the database.
>
> executesql.error.message = 'com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sap://hana-xxxxxx:30041 [Cannot connect to host hanaxxx:30041 [Connection refused (Connection refused)], -813.].'
>
> Thanks,
> Asmath