Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
data deply preprocessor
motlnt
I imported a file within teamsite and set the metadata for that file.
Now while datadeploying, i want to get the user information for that file and store it in database i.e. basically the username.
I want to get the username in datadeploy preprocessor and then store it in database.
I dont have this userid(username) field in metatagger UI but is available in database. I want it to be automatically done.
In case of normal DCT's, we get this value using IWDatacapture.getUser()
Thanx
Find more posts tagged with
Comments
Dwayne
Which username are you talking about? The user who last modified the file? The user running data deploy?
In your FormAPI example, those two users happen to be the same. That's not necessarily true for a run of DD
I don't think that either are readily available, but it might be possible to find a way to extract them. But the method would be radically different for thw two different attributes, so it's important to know which one you're after.
--
Current project: TS 5.5.2/6.1 W2K
motlnt
The user who last modified the file.
Migrateduser
Maybe use iwattrib <vpath> lastuser to get the user (not sure this will always be accurate). I don't know much about DataDeploy, maybe you have to set this returned value as an extended attribute to get DD to pick it up?
Dwayne
The user who last modified the file
I suspect that what you'll have to do is to make use of the
ExternalTupleProcessor
facility in DD. You write a Java class that implements this interface, and link it into DD. In that class, you can perform whatever manipulations are required on the tuples, including inserting new values. So you could run the CLT to get the last mod user, and add it to the tuple before DD writes it to the database.
--
Current project: TS 5.5.2/6.1 W2K