Skip to Content
author's profile photo Former Member
Former Member

How to use a post load command sql script

I would like to use teh following:

$LV_date=sysdate();

sql('Source','update Tbl_Job_Status set j_end_time=\'$LV_date\'');

want the above script to be executed right after a successful load of data to target table.

How to use postload command, Never used a post load command: i see two multi line text boxes in the post load command tab.

the bottom one show value, can you please provide teh steps to use post load command.

Thank you very much for teh helpful info.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Feb 24, 2012 at 10:16 AM

    You must use only SQL commands in post_load command, not DS scripts.

    You double click the icon in the 'SQL Command' panel and then overwrite the '*' in the Value panel with your SQL command.

    You can use variables in the SQL command if you enclose them in square (for numbers) or curly (for chars) braces.

    So in your case you would set your variable in a normal script before the dataflow and then use the postload command:

    update <database>.<owner>.Tbl_Job_Status set j_end_time={$LV_date}

    NB: You need to fully qualify the table name if it isn't in the same datastore as the target table containing the post load command.

    NB: DS will not verify the SQL command entered, if there is an error, the job will fail.

    You can enter multiple SQL commands by repeating the process.

    Edited by: Clint Lotter on Feb 24, 2012 11:16 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2012 at 07:59 PM

    Though i haven't used a post load command before this should be the way to do it.

    You have to write a basic sql syntax test in sql server and paste the same on post load tab.

    If it is an update statement, write the statement in sql, test it and paste it on the tab. No need for scripts with datastore names.

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2015 at 06:28 AM

    I try to execute an stored procedure but in sap hana and throw a syntax error

    call IEXSA.PRUEBA;

    any clue??

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.