Skip to main content
Solved

Passing Named Connection Value from attribute


samisnunu
Contributor
Forum|alt.badge.img+10

Hi,

In workspace_01 I have a WorkspaceRunner transformer that runs workspace_02 that uses a SQLExecuter transformer.

The SQLExecuter utilizes a parameter to receive the Named Connection required (e.g., gisdata_01@SDEDB or gisdata_02@SDEDB, etc..) that's working great.

However, the issue happened within the workspace_01 with the WorkspaceRunner, unless I select from the available named connection to assign, the workspace_02 won't work successfully; i.e. assign by 'Attribute Value' or 'User Parameter' from the sub menu.

A closer look into the log window revealed how the parameter was interpreted/passed to the workspcase_02 as:

--SDE_NAMED_CONNECTION {\\<at>Value<openparen>_Named_Connection<closeparen>}

While it should be:

--SDE_NAMED_CONNECTION' `gisdata_02@<at>SDEDB' `

#FME 2016.1

Please help

Best answer by takashi

Hi @sami_snunu, as you observed, it seems that the NAMED_CONNECTION parameter created from the Create User Parameter command associated to a Connection setting field doesn't decode the parameter value passed through the WorkspaceRunner.

This workaround might work for you:

  1. In the workspace_02, create another published parameter with Choice type, e.g. named DB_CONNECTION, and add the available connection names - "gisdata_01@SDEDB", "gisdata_02@SDEDB" etc. to the choices.
  2. Convert the original NAMED_CONNECTION parameter to a private parameter, and link it's default value to the DB_CONNECTION. See the screenshot below.
  3. In the workspace_01, set an attribute value to the DB_CONNECTION parameter in the WorkspaceRunner.

View original
Did this help you find an answer to your question?

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • April 13, 2017

Hi @sami_snunu, as you observed, it seems that the NAMED_CONNECTION parameter created from the Create User Parameter command associated to a Connection setting field doesn't decode the parameter value passed through the WorkspaceRunner.

This workaround might work for you:

  1. In the workspace_02, create another published parameter with Choice type, e.g. named DB_CONNECTION, and add the available connection names - "gisdata_01@SDEDB", "gisdata_02@SDEDB" etc. to the choices.
  2. Convert the original NAMED_CONNECTION parameter to a private parameter, and link it's default value to the DB_CONNECTION. See the screenshot below.
  3. In the workspace_01, set an attribute value to the DB_CONNECTION parameter in the WorkspaceRunner.


samisnunu
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • April 13, 2017

Many Thanks @takashi, that worked perfectly! :-)

I also appreciate your effort and time for the illustration in the screenshot.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings