Informatica 问题 - 参数文件
我的来源是dat文件。最初在设计器中,我可以从本地导入文件。但稍后它会进入共享位置,Informatica 需要从那里选择它。我想,为此我需要将参数值“源文件目录”=“$PMSourceFileDir\”放在工作流管理器的会话级别。现在这个参数文件位于哪里?我怎样才能让它编辑它,以便我也可以输入我的参数值。 Informatica 安装在我的本地,但我正在连接到远程存储库。有没有其他方法可以让 Informatica 从远程位置选取此 dat 文件。请帮忙。
My source is dat file. Intially in designer I can I import the file from my local. But later it gonna to come in shared location and Informatica need to pick it from there. I guess, for this I need to put parameter value 'Source file Directory' = '$PMSourceFileDir\' at session level in Workflow Manager. Now where is this Parameter file located? How can I get it to edit it so that I can put my parameter value also. Informatica is installed in my local but I am connecting to the repository of remote. Is there any other way so that Informatica can pick this dat file from a remote location. Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
$PMSourceFileDir 通常作为 Informatica 服务器初始化的一部分进行设置,因为它是一个服务器变量。如果您想在工作流程中覆盖它,可以在参数文件中执行此操作。
在工作流程监视器中,转到工作流程设计器选项卡,打开您的工作流程。
转到
工作流程>;编辑>属性>参数文件名。
$PMSourceFileDir is usually set as part of the Informatica server initialization, since it is a server variable. If you want to override it for your workflow, you can do so in a parameter file.
In your workflow monitor, go to the workflow designer tab, open your workflow.
Go to
Workflow > Edit > Properties > Parameter file Name.
在工作流程设计器中,将您的工作流程加载为当前工作流程,选择“工作流程...编辑...属性”选项卡,然后查看属性“参数文件名”的值。这会显示您的工作流程正在使用的参数文件的位置和名称。例如,在该文件中,您可以更改 PM* 变量的可解析值。请记住,对于每个会话,您可以为源文件等指定不同的 PM* 值,但请记住,许多企业遵循层次结构标准,其中每个工作流的源目录和目标目录都有自己指定的源目录和目标目录,因此当开发人员在会话中设置这些内容时,通常遵循以下形式:$PMSourceFileDir/{workflow_specific_folder_name}。遵循该标准,如果您不能或不适用,请不要让它阻止您;在指示源文件目录时,只需为该会话使用不同的 ${var_name} 即可。如果您想避免将此类更改硬编码到工作流程本身中,则可以在 .parm 文件中执行此操作。 .parm 文件中会更改 PM* 值的示例条目:
除了最后一个条目之外的所有条目都是公司标准类型内容的示例;您的企业可能有不同种类的东西。但最后一个条目是指定自定义 $PM* 值的示例;在本例中,$PMSourceFileDir_{session_name} 其中 {session_name} 当然是您想要为其定制源文件夹的会话的名称。在工作流程中的相关会话中,您需要指示:
将 {session_name} 替换为会话的实际名称。然后,在源目录属性中,如果您使用该变量,它将解析为您在 .parm 文件中为其指定的自定义目录位置。
In the Workflow designer with your workflow loaded as the current one, choose Workflows...Edit...Properties tab and then look at the value of property 'Parameter filename'. This shows you the location and name of the parameter file that your workflow is using. In that file you can change the resolvable values of the PM* variables, for example. Remember that for each Session, you can specify different PM* values for things like source files, etc., but bear in mind many enterprises follow a hierarchy standard whereby source and target dirs for each workflow have their own specified source and target dirs, so when developers go to set these in Sessions, it often follows a form like: $PMSourceFileDir/{workflow_specific_folder_name}. Follow that standard or if you can't or if it's N/A, don't let that stop you; just use a different ${var_name} for that session when indicating a source file directory. The .parm file is where you would do this if you want to avoid hard-coding such changes into the workflow itself. Example entry in a .parm file that'd change PM* values:
All but the last entries are examples of corp standard kind of stuff; your enterprise may have different sorts of things there. But the last entry would be an example of specifying a custom $PM* value; in this case, $PMSourceFileDir_{session_name} where {session_name} is of course the name of the session you want a customized source folder for. In the session in question in your workflow, you'd indicate:
replacing {session_name} with the actual name of the session. Then in the source directory property, if you used that variable, it'd be resolved to the custom directory location you specified for it in the .parm file.
我不相信您需要参数文件。参数文件用于根据文件内容更改 Informatica 的行为,允许您通过编辑文件而不是编辑 Informatica 代码来更改行为。
当 Informatica 读取源文件时,它始终从本地计算机读取,因此更改 $PMSourceFileDir 的值或更改“源文件目录”的值只会更改在本地计算机上查找文件的位置。
您有几个选择:
* 首先将文件复制到您的 Informatica 主机。
* 使用 S/FTP 连接并从任何位置读取文件,假设该位置正在运行 FTP 服务器或 SSH。
* 使用 NFS 安装或 SSHFS。
I do not believe you will need a parameter file. Parameter files are used to change Informatica's behavior based on the contents of a file, allowing you to change behavior by editing a file rather than editing Informatica code.
When Informatica reads a source file it is always from the local machine, so changing the value of $PMSourceFileDir or changing the value for 'Source file directory' will only change where on the local machine it will look for your file.
You have a few options:
* Copy the file to your Informatica host first.
* Use an S/FTP connection and read the file from wherever it may be located, assuming that place is running an FTP server or SSH.
* Use an NFS mount or SSHFS.
您还可以将参数文件放置在 下,
右键单击 Session >编辑>属性>参数文件名
这将覆盖工作流属性中指定的参数文件位置。
我认为“源文件目录”只能连接到本地服务器,如果您希望在某个远程服务器上创建目标,则需要创建一个会话后脚本在工作流程成功执行后,这会将文件从本地服务器 scp/ssh 到远程服务器。
You can also place the parameter file under ,
Right-click Session > Edit >Properties > Parameter Filename
this will override the parameter file location specified in workflow properties.
I think 'Source file Directory' will only be able to pont to the local server, if you wish to create target at some remote server you need create a post-session script which will scp/ssh the file from the local server to remote server after workflow get successfully executed.