cancel
Showing results for 
Search instead for 
Did you mean: 

Sender JDBC 7.3 - Query Statement passing dynamic variables

former_member191528
Participant
0 Kudos

Hello All,

Have a requirement where we need to query the database for a set of records every hour using date time stamp and pass the records to Java web service.

Sender JDBC - PI - SOAP (EOIO)

Can we do something using sender jdbc adapter where select * from table where Datetime > Parameter

The Parameter will change every hour.

Can this be achieved without a Stored procedure ?

Also if the database server is different for different locations then can it be set at runtime based on input parameters ?

Thanks,

Kiran

Message was edited by: Kiran Sakhardande

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What will be the parameter value?

You can use getDate() or currentDate function in your query.to get current date form system

Regards

Osman

former_member191528
Participant
0 Kudos

Thanks Osman !! That's perfect. I actually need to pass previous day with current time . I  can use some sql manipulation for it.

Also my database servers are located at different locations. Is there a way to dynamically update the connection string from somewhere  for Sender JDBC ? I can have a value mapping but how can I trigger it.

former_member191528
Participant
0 Kudos

Hi Osman !! In case of errors we want to supply a date which is (6 days in the past). The ideal scenario is one day in the past. Can it be achieved in Sender JDBC ? Dynamically changing parameters for supplied date.

Former Member
0 Kudos

I don't think it is possible to have dynamic connection configuration for Sender adapter.

Regards

Osman

former_member191528
Participant
0 Kudos

Thanks Osman !! We are planning to create a new communication channel per site to address this issue.

Also is it possible to pass dynamic parameter like ID = 5 in the Query statement when the service is called via the sender comm. channel ?

Can we use a dummy update statement if we don't want to execute anything ?


Thanks,

Kiran

nabendu_sen
Active Contributor
0 Kudos

Hi Kiran,

For Sender JDBC Adapter you can not make queries with Dynamic attributes, but for Receiver thats possible.

Regards,

Nabendu.

nabendu_sen
Active Contributor
0 Kudos

I dont think its possible.

Regards,

Nabendu.

former_member191528
Participant
0 Kudos

Thanks Nabendu !! That is good to know.

Answers (0)