Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Decrypted File Data loading fails

Avatar

Level 1

Hi , I am having an input file decrypted on the fly and loaded subsequently in a dataloading step.

vars.postProcessingCmd = "gpg --decrypt /x/x/xxx.pgp";

I get the bellow error in the subsequent data loading.

PGS-220000 PostgreSQL error: ERROR:  COPY from stdin failed: BAS-010003 Unable to complete operation in current status. CONTEXT:  COPY wkf235686327_2209, line 125

I had checked separately to make sure the decryption works and it does. Not sure why it seem to fail here.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Set the Data loading (file) activity set to 'Pre-process the file', '|gpg --decrypt /x/x/xxx.pgp' (or <%= vars.filename %> for use with other actiivties like File collector).

Thanks,

-Jon

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

Set the Data loading (file) activity set to 'Pre-process the file', '|gpg --decrypt /x/x/xxx.pgp' (or <%= vars.filename %> for use with other actiivties like File collector).

Thanks,

-Jon

Avatar

Level 1

This is were i am puzzled.

1) I first issued this command to ensure my decryption works

logInfo("--"+execCommand('gpg  --output /sftp/X/X/chez.dat --decrypt /sftp/x/x/Test_20190702_2_Delta.dat.pgp ',true)[1]);

and the file was rightly decrypted. I even processed in a subsequent data load.

2) But for some reason when i issued |gpg --decrypt /x/x/xxx.pgp' or <%= vars.filename %>

I get the bellow error . It seem to hit some issue on the last line of the file.

PGS-220000 PostgreSQL error: ERROR:  COPY from stdin failed: BAS-010003 Unable to complete operation in current status. CONTEXT:  COPY wkf235686327_2229, line 3

07/02/2019 5:16:59 PM    WKF-560005 An error occurred when processing the '|gpg  --decrypt /sftp/x/x/Test_20190702_2_Delta.dat.pgp' order ('Data loading (file)' step)

Avatar

Level 4

Hi,
Maybe Try this command.

gunzip -c "<%= vars.filename %>"

Regards.