Support Questions

Find answers, ask questions, and share your expertise

What is the value of ${wf:user()} and where it is defined ?

avatar
Master Guru

Q1. Need more clarification on below variable substitution, Is it $username who submits the workflow ?

HADOOP_USER_NAME=${wf:user()}
1 ACCEPTED SOLUTION

avatar

Yes, the name of the user that started the job or workflow will be available through this variable.

See this code partial: https://github.com/apache/oozie/blob/master/core/s...

/**
 * Return the job owner user name.
 *
 * @return the job owner user name.
 */
public static String wf_user() {
    return getWorkflow().getUser();
}

View solution in original post

1 REPLY 1

avatar

Yes, the name of the user that started the job or workflow will be available through this variable.

See this code partial: https://github.com/apache/oozie/blob/master/core/s...

/**
 * Return the job owner user name.
 *
 * @return the job owner user name.
 */
public static String wf_user() {
    return getWorkflow().getUser();
}