Replies: 1 comment 2 replies
-
You need to use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ask a question
How can I pass the dynamic values for username: ${variable.sauser} is not getting the value sa but in logger I see in uri: kamelet:sqlserver-sink
Logger I see the values....
2025-02-18 15:57:47.323 INFO 16 --- [worker-thread-3] m2mdbtest.camel.yaml:39 : sa
2025-02-18 15:57:47.324 INFO 16 --- [worker-thread-3] m2mdbtest.camel.yaml:42 : sa
Below is the .yaml file,
component: platform-http
contextPath: /m2m
id: rest-46cf
path: /eventsService
post:
- id: post-a402
to: direct:post
id: route-b5eb
nodePrefixId: route-c0a
from:
id: from-7b12
uri: direct
parameters:
name: post
steps:
- unmarshal:
id: unmarshal-fd16
variableReceive: sauserummar
json:
id: json-a946
library: Jackson
- setVariable:
id: setVariable-35f6
name: sauser
expression:
simple:
id: simple-b660
expression: ${jq(.username)}
- setProperty:
id: setProperty-2043
name: usernameprop
expression:
exchangeProperty:
id: exchangeProperty-6368
expression: ${jq(.username)}
- log:
id: log-abab
message: usernameprop
- log:
id: log-45e3
message: ${variable.sauser}
- log:
id: log-3543
message: " ${jq(variable:sauserummar,.username)}"
- to:
id: to-aba6
uri: kamelet:sqlserver-sink
parameters:
serverName: 10.183.131.88
password: {}
query: >-
insert into personal (firstname,lastname)
values('FName','LName');
databaseName: M2MData_1_01
trustServerCertificate: true
username: ${variable.sauser}
Variant
None
Container Management (if applicable)
None
Operating System (if applicable)
None
Version
None
Beta Was this translation helpful? Give feedback.
All reactions