span8
span4
span8
span4
我可以一个变量传递给FME更换工作空间内的固定值?
值可以传递到工作台使用所谓的parametersin Workbench. A parameter can be set and passed for a Transformer setting or a dataset read/write setting.
To set a parameter go to the Workspace tab in the navigation pane of Workbench.
For transformers Locate the Transformers section. This shows a list of transformers used in your workspace. Expand the transformer of interest and locate the required setting. Right-click the setting and choose Publish Parameter. This brings up a dialog that lets you set the default value of this parameter, a prompt for the parameter and a parameter name. Set these and click OK. The parameter is now published. When the Prompt+Run function is used in Workbench you will be prompted to set a value for this parameter. When you run the workspace from the command line you are able to pass through a value for that parameter.
For example: in an AttributeSetter instead of setting the ‘value’ field to a fixed value you could use a parameter.
Above: Here an AttributeSetter value is about to be published.
Above: Publishing the parameter brings up a dialog which this user has edited to his requirements.
Above: On running the workspace the user is prompted for a value for this parameter.
Above: The log file reports the value provided in a form that can be used to run the translation from the command line.
Locate the dataset and expand it to show all the settings. Right-click the setting and choose Publish Parameter. This brings up a dialog that lets you set the default value of this parameter, a prompt for the parameter and a parameter name. Set these and click OK. The parameter is now published. When the Prompt+Run function is used in Workbench you will be prompted to set a value for this parameter. When you run the workspace from the command line you are able to pass through a value for that parameter.
For example: an Oracle reader requires a password. The password setting can be published so the user is prompted on running the translation.
Above: Here an Oracle password is about to be published.
Above: Publishing the parameter brings up a dialog which this user has edited to his requirements.
Above: On running the workspace the user is prompted for a value for this parameter.
Above: The log file reports the value provided in a form that can be used to run the translation from the command line.
Do this the same way as for a dataset parameter.
Above: Feature Type parameters are found in the Feature Types part of a Dataset within the Workbench navigation pane. Here are the reading parameters for a feature type belonging to an Oracle dataset.
要创建用户定义的参数 - 一个是从任何特定的变压器,数据集或特征类型分离 - 参见上节Standalone_Published_Parameters(Article#:000001408).
Published Parameter use within a Startup or Shutdown Script
通过Published Parameter to a Workspace from the Command Line
Introduction to Published Parameters
Concatenating or Combining Published Parameters
Setting up a workspace to deploy in production, staging and local
Grouping Layers or Feature Types into Themes
Pass a List of Tables or Layers to an FME Reader using Python Scripted Parameters
© 2020 Safe Software Inc |Legal