Hi,
Build a load file based off this example. Replace CIX with the CI name, useridX with the userid who you want to associate with the CI, and last_mod_by with your userid. Save this file to a location on an app server.
1. Create the file usp_lrel_cenv_cntref_deref.dat with the following contents
TABLE usp_lrel_cenv_cntref
ci_name_DEREF userid_DEREF last_mod_by_DEREF tenant
{ "CI1",
"userid1", "mod_by_userid",
"" }
{ "CI2",
"userid2", "mod_by_userid",
"" }
{ "CI3",
"userid3", "mod_by_userid",
"" }
{ "CI4",
"userid4", "mod_by_userid",
"" }
2. Create a spec file to do the conversion and name it usp_lrel_cenv_cntref.spec
Deref
{
input=userid_DEREF
output=cnt
rule="select id from ca_contact where userid=? "
}
Deref
{
input=last_mod_by_DEREF
output=last_mod_by
rule="select id from ca_contact where userid=? "
}
Deref
{
input=ci_name_DEREF
output=nr
rule="select own_resource_uuid from ca_owned_resource where resource_name =? "
}
3. Put both the dat and spec file in a folder on your app server then navigate to the folder in command prompt.
4. Run the command, pdm_deref -s usp_lrel_cenv_cntref.spec usp_lrel_cenv_cntref_deref.dat > usp_lrel_cenv_cntref_final.dat (the -s flag specifies the spec file, the next file is the file to dereference, then it outputs the dereferenced data into a new file.)
5. Review the output in the new usp_lrel_cenv_cntref_final.dat file to ensure it looks right.
6. Run the command pdm_load -if usp_lrel_cenv_cntref_final.dat to load the data