Welcome Guest! Log in

Topic-icon Question Filter not exists in a mapping - Get the name of the schema

More
14 Mar 2016 14:30 #1 by Emmanuel Rambeau
Good afternoon,

I try to make a filter with a "not exists", and I would like to put the name of the schema.
See the example below :



F0150 is the name of the table.
I would like to replace the area in red by a syntax like schema.tablename. I tried several syntax, "physicalName" included (it was an advice).

I noticed that the xpath "physicalPath" on the table return the right result. But how could I use it ?

Thank you for your help.

Best regards,

Emmanuel Rambeau
Attachments:

Please Log in or Create an account to join the conversation.

More
15 Mar 2016 11:11 #2 by Thomas BLETON
Hi Emmanuel,
I would try something like this :
%x{md:objectPath(ref:schema('TheSchemaName'), 'F0150')}x%

... where TheSchemaName is the "Name" property of the schema.

Note : the syntax with ${...}$ is for process parameters. Here you need Xpath, so you want to use the syntax %x{...}x%

Please Log in or Create an account to join the conversation.

More
15 Mar 2016 17:22 #3 by Emmanuel Rambeau
Hi,

Thank you for your help. It works perfectly.

Regards,

Emmanuel Rambeau

Please Log in or Create an account to join the conversation.

More
18 Mar 2016 10:23 - 18 Mar 2016 10:24 #4 by Emmanuel Rambeau
Good morning,

In fact, %x{md:objectPath(ref:schema('TheSchemaName'), 'F0150')}x% returns SCHEMA.F0150 (with the name of the table).
It works if I remove the name of the table in the expression editor. It is not a problem in the case of the "not exists".

Nevertheless, I'm facing a case where I need only the name of the schema, for a mapping in the target this time.

I use some sequences Oracle, and I have to prefix it by the name of the schema only.
I tried several syntax, but I don't find the right.



What is the right syntax to put it ?
Attachments:
Last edit: 18 Mar 2016 10:24 by Emmanuel Rambeau.

Please Log in or Create an account to join the conversation.

More
18 Mar 2016 11:12 - 18 Mar 2016 11:13 #5 by Thomas BLETON
In this case, you want to use the schema of the current context's metadata (the target).
You can refer to the target's schema like this :
%x{md:objectPath(ref:schema(), 'SEQ_DOCUMENT_CLASS')}x%.NEXTVAL

Does this work for you ?
Last edit: 18 Mar 2016 11:13 by Thomas BLETON.

Please Log in or Create an account to join the conversation.

More
18 Mar 2016 11:18 #6 by Emmanuel Rambeau
Yes, it works...
I did not expected that, because SEQ_DOCUMENT_CLASS is not defined in the metadata. I thought it was necessary, also I did not try to use it.

Well, thank you.

Please Log in or Create an account to join the conversation.