I have a job , where i am unloading data from snowflake and sending email to customer. My file name is generating dynamically and storing into job variable. Once the file downloaded to storage ,i am calling another job for sending email.
How can i pass the variable from one job to another job?
In your unloader job, give it a Job Variable (can be public or private) to hold the filename. You probably have already done this, let's say it's named v_filename
Give the emailing job a public Job Variable
In your unloader job, when you call the emailing job with a Run Orchestration, go to the Set Scalar Variables property and add a line which sets the emailing job's variable to ${v_filename}
That way, at runtime the unloader job will pass its variable to the emailing job.
I have found it can be difficult to debug these, because while you are developing the job the variables have no value. It's useful to have a default value for that reason. There's a helpful document here which gives some more detail.
i am not sure that i understand the problem correctly, but why you use job variables in case that you want to use this variable in another job (project wide)? For this you can use "environment variables", these variables including the current value are available in each job.
As you said , Set scalar variables worked fine for me.
My export job call the zip job and its works fine. now am looking for to pass the variable from Zip job to export job.
Like
My Job 1 will generate the file , it will call the job 2 using Run Orchestration, job 2 will generate the zip file and store it in the local now i want to pass the generated zip file name and path to Job 1 and my job 1 will trigger an email.
Job 1 : Will call the snowflake and generate the file and store it in the Azure Storage
Job 2 : Independent job , which i can use it for all the export jobs. this job will take the file from azure and move it to local using python and also it will zip the file and add the password to the file which also send email to customer.
I used job variable for File name ( which can be generated dynamically based on the job 1 ), File location ( I am creating a local directory based on the job 1) and then file extension( passing .txt / .csv/.pdf based on the job 1)
I cannot create environment variables for all the exported jobs right? correct me if my understanding is wrong.