How to pass named parameters to sql query?
Issue
- Using Camel's SQL component, we try to assign values from headers, but it does not populate
- I’m having trouble binding header values into SQL URIs and printing the query results.
- stack trace:
Tracer:
[hread #0 - timer://startRoutes] Tracer INFO IDxx000000-0000000-0000000000-1 >>> (SPRSQLTestRoute) Processor@0x45a40fac --> sql://SELECT%00*%00FROM%00ContractPerformance%00WHERE%00AccountNumber%00IN%00(:%23accs)%00AND%00BidNumber%00in%00(:%00Numbers) <<< Pattern:InOnly, Headers:{accs='0000000000000','0000000000000', Numbers='A111111111','B222222222', breadcrumbId=ID-AB1111111111-8888888888-99999999-0-1, firedTime=Wed Mar 02 10:11:04 EST 0016}, BodyType:null, Body:[Body is null]
[hread #0 - timer://startRoutes] Tracer INFO IDxx000000-0000000-0000000000-1 >>> (SPRSQLTestRoute) sql://SELECT%00*%00FROM%00ContractPerformance%00WHERE%00AccountNumber%00IN%00(:%23accs)%00AND%00BidNumber%00in%00(:%00Numbers) --> Processor@0xbe4eb41 <<< Pattern:InOnly, Headers:{accs='0000000000000','0000000000000', Numbers='A111111111','B222222222', breadcrumbId=ID-AB1111111111-8888888888-99999999-0-1, CamelSqlRowCount=0, firedTime=Wed Mar 02 10:11:04 EST 0016}, BodyType:java.util.ArrayList, Body:[]
Environment
- Red Hat JBoss Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.