Page 1 of 1

CALL UNIX SHELL SCRIPT FROM JOB

Posted: Thu Dec 30, 2021 2:14 pm
by GES
Hi there.

Here's the thing.

I need to call a unix script from a parallel job. I need to pass a input parameter (column from a source) and then get a output from the script that will be send to a target stage (sequencial file for instance). That script takes a sigle input, make some calculation, and then returns a single value.

I know there's a way to call a shell script from job properties (after-before sub) but I need to process each row from my source :roll:

Tried with encode, external filter stage, but no success. :oops:

Thank you very much.

Ges

Re: CALL UNIX SHELL SCRIPT FROM JOB

Posted: Fri Dec 31, 2021 8:01 am
by PaulVL
There is a Stage for that. Try the External Source Stage I believe.

Re: CALL UNIX SHELL SCRIPT FROM JOB

Posted: Fri Dec 31, 2021 8:32 am
by GES
Hi.

Didn't work. External Source is pretty much a way to generate a start data flow. I already have a source and I need to process each row (transform stage). I managed to do it in server job using a routine to run a unix script, works actually quite well but need to build it in parallel job.

:roll:

Thanks anyway!

G

Re: CALL UNIX SHELL SCRIPT FROM JOB

Posted: Fri Dec 31, 2021 11:58 am
by PaulVL
Have you thought of using a build op?

Re: CALL UNIX SHELL SCRIPT FROM JOB

Posted: Mon Jan 03, 2022 8:01 am
by GES
Hi.

Build op? Heard of but i've never used them. Considering I don't have a related/proper build op example as a starting point, it can backfire by not having enough time.

Thanks PaulVL.

SC