Author |
Message
|
madi |
Posted: Wed Jul 26, 2006 12:23 pm Post subject: mapping node "Enter Expression" |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Im trying to insert the CURRENT_TIMESTAMP into one of the output fields using a mapping node
heres what im doing
right click on a target element and say "Enter Expression"
Code: |
esql: CURRENT_TIMESTAMP |
gives the error
Quote: |
Severity Description Resource In Folder Location Creation Time
2 Invalid expression semantic. Expression sequence "esql:CURRENT_TIMESTAMP" has valid syntax, but it's meaning is unsupported by the mapping editor. An operator in the given expression has an unsupported value or argument. The value or argument is not a valid expression type. Test_Flow2_Mapping.msgmap First_Test July 26, 2006 3:20:34 PM
|
Code: |
esql: CAST(CURRENT_TIMESTAMP AS CHAR) |
gives the error
Quote: |
Severity Description Resource In Folder Location Creation Time
2 Invalid expression syntax. Expression sequence "esql:CAST(CURRENT_TIMESTAMP AS CHAR)" only partially parsed to column: 9. A resultant expression therefore would only represent expression sequence "esql:CAST". Test_Flow2_Mapping.msgmap First_Test July 26, 2006 3:21:31 PM
|
did anyone successfully use the mapping node .. ive been all over the info center but in vain
thoughts??
--madi |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 26, 2006 2:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Create a function and call that from the mapping node. The function will then return the desired value. _________________ MQ & Broker admin |
|
Back to top |
|
 |
madi |
Posted: Thu Jul 27, 2006 6:52 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
well it is only recognizing the esql functions that take in the source parameter and give the target parameter which makes sense for any doing any kind of transformations
but i do not have a source parameter ...... i just want to populate a target field regardless of the source!!
--madi |
|
Back to top |
|
 |
madi |
Posted: Thu Jul 27, 2006 12:04 pm Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
so no one implemented the mapping node like this?? or may be everybody is just being quite today !!!
--madi |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 27, 2006 2:49 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You may use any source parameter by reference and ignore it in the function...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
madi |
Posted: Fri Jul 28, 2006 6:20 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
well .. i could do that but it doesnt sound like the right way to do it ........
thanks for your help
--madi |
|
Back to top |
|
 |
michaelharris |
Posted: Fri Jul 28, 2006 9:51 am Post subject: |
|
|
 Novice
Joined: 09 Jun 2006 Posts: 20
|
Madi, which version of broker are you running? I've had success using version 6.0. |
|
Back to top |
|
 |
madi |
Posted: Mon Jul 31, 2006 12:55 pm Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
6.0
how did you do it??
--madi |
|
Back to top |
|
 |
michaelharris |
Posted: Wed Aug 02, 2006 7:25 am Post subject: |
|
|
 Novice
Joined: 09 Jun 2006 Posts: 20
|
Sorry for the delay madi:
The correct syntax in the mapping node expression is
Code: |
esql:current-timestamp() |
You can use the content assist function (CTRL+SPACE) when your cursor is in the Edit pane of the mapping editor to display functions available. If you need to use casting, there is a list of supported casts in the content assist list.
Let me know if this works.
-Michael |
|
Back to top |
|
 |
|