user1173496
user1173496

Reputation: 111

Informatica issue - Parameter file

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.

Upvotes: 1

Views: 26788

Answers (4)

Matt Campbell
Matt Campbell

Reputation: 2237

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:

---TOP OF FILE---
[Service:{Name}]
$PMSessionLogDir=/{path}/SessLogs/
$PMBadFileDir=/{path}/BadFiles/
$PMWorkflowLogDir=/{path}/WorkflowLogs/
$PMTargetFileDir=/{path}/TgtFiles/
$PMSourceFileDir=/{path}/SrcFiles/
# Above are just example names of directories
...
# Example of specific session that has variables set for it herein
[~{Project_folder_name}.WF:{Workflow_name}:{session_name}]
$$Repository_Name={repo_name}
$$Folder_Name={Project_folder_name}
$$Workflow_Name={wkf_name}
$DBConnection_Reusable_Comp_source={source_name}
$DBConnection_Repo={Repo_conn_name}
$$DBConnection_Reusable_Comp_source={Comp_source_name}
$$DBConnection_Repo={Conn_repo}
$PMSessionLogFile={Log_file_name}
$PMSourceFileDir_{session_name}={custom_source_file_dir}

... {etc.} ...

--- BOTTOM OF FILE ---

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:

$PMSourceFileDir_{session_name}

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.

Upvotes: 1

Sandeep
Sandeep

Reputation: 36

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.

Upvotes: 0

jsf80238
jsf80238

Reputation: 107

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.

Upvotes: 0

Rajesh Chamarthi
Rajesh Chamarthi

Reputation: 18818

$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.

Upvotes: 3

Related Questions