Hi Airu,
Here's an example showing how to update Access Type via pdm_userload and pdm_deref.
First start with an input file, this contains the userid for your users and access type name.
input_file.dat
Table usp_contact
userid_DEREF c_acctyp_id_DEREF
{"userid1","Access Type 1"}
{"userid2","Access Type 1"}
{"userid3","Access Type 2"}
Next save this code into a file named cnt_access_type_deref.dat. When you run the pdm_deref command against this file it will convert the userid_DEREF column to ID and will contain users contact_uuid, it will also gather the ID for the access type.
cnt_access_type_deref.dat
Deref
{
input=userid_DEREF
output=id
rule="select id from ca_contact where userid =?"
}
Deref
{
input=c_acctyp_id_DEREF
output=c_acctyp_id
rule="select id from Access_Type_v2 where sym =?"
}
Once you have your input and deref file you can run pdm_deref to generate the final load file. After running pdm_deref review the outputfile.dat to ensure it correctly converted the column and user data. I suggest testing this before running it against a production environment.
Example: pdm_deref -s cnt_access_type_deref.dat input_file.dat > outputfile.dat
Lastly, run pdm_userload to load your data.
Example: pdm_userload -f outputfile.dat