Environment Variables
Fivetran Local Data Processing offers a set of environment variables for tuning, tracing and managing different processes involved in replication, refresh, compare, etc.
In certain cases, environment variables are provided to a customer as a temporary workaround and must be used under the guidance of the Local Data Processing technical support.
The following methods are available to define environment variables in Local Data Processing:
To determine which method to use, it is important to understand which process the environment variable affects in each specific situation. For example, some environment variables are only effective if defined on a process or a hub process, while others have an effect on the entire Local Data Processing system.
Action sets an operating system environment variable for a Local Data Processing process on the location where the action is defined. An environment variable defined with action does not have an effect on the High-Volume Agent (HVA) listener process. It will only apply to the Local Data Processing process that is spawned by the HVA listener. The same is true for a systemd/xinetd setup running on a remote machine.
It is not possible to set environment variables on Local Data Processing hub server using the action. To do this, should be used. Environment variables defined using this method apply only to job processes running ona Local Data Processing hub server machine, i.e. the hub processes and all local child processes. However, these environment variables will not be exported to remote child processes (on a remote machine running the HVA Listener process or any systemd or xinetd setup). For example, if you define ENV1=VAL1 on a capture job using job attributes and the capture location uses HVA, then the process running on that agent machine will not have ENV1=VAL1 set. If instead, you defined it with the action on that capture location (or its location group), then the process running on the HVA machine will also have ENV1=VAL1 set.
For the case with job attributes, to pass environment variables to the remote child processes, you must use the HVR_EXPORT environment variable. It accepts a list of 'name=value' pairs separated by a semicolon and exports all the specified environment variables to the remote child processes.
Command Line
You can specify an environment variable for any command you run from a terminal. This can be done either by specifying the environment variable for the command only or for your terminal process.
Setting an environment variable on the command line can have an effect on the correct processes, but note that command lines sometimes do not execute the code you need directly. For example, command with option -i starts a job interactively, so this would be the correct process to trace capture, for example. But without option -i, it tells the Scheduler to start the job, so the environment of has no effect on the environment of the capture job.
To specify an environment variable for the command only:
On Windows or Linux/Unix, run the following command
hvr -E HVR_PROC_TRACE=1 hvrstart -i hub chncontent_copyAlternatively, on Linux/Unix only, run the following command
HVR_PROC_TRACE=1 hvrstart -i hub chncontent_copy
To set the variable in your terminal process, run the following command:
export HVR_PROC_TRACE=1
hvrstart -i hub chn
content_copyAction Environment
An environment variable set with the action will apply only to the child processes of the location that the action is defined for. The hub process will not be affected.
Job Attributes
An environment variable set using applies to a job process, i.e. the hub process and all local child processes.
Comments
0 comments
Please sign in to leave a comment.