Forum Stats

  • 3,855,310 Users
  • 2,264,499 Discussions
  • 7,905,967 Comments

Discussions

FDMEE: Unable to capture successful Import status Flag in afterimport script

2»

Answers

  • SH_INT
    SH_INT Member Posts: 3,192 Bronze Crown
    edited Sep 7, 2015 11:07AM

    add outfile.write(str(status["IMPSTATUS"])) to the else clause and tell me what value is being returned

    Ishti
  • Ishti
    Ishti Member Posts: 41 Red Ribbon
    edited Sep 7, 2015 11:24AM

    The Value is 0

  • SH_INT
    SH_INT Member Posts: 3,192 Bronze Crown
    edited Sep 7, 2015 11:50AM

    Did you say that the IMPSTATUS is correctly returned in the AftValidate event script? If that is the case then this status flag is probably only set after a successful validation as well as import step. If you think of how DLRs work in FDMEE it is easy to see why this may be the case. When you execute a DLR and select the Import from Source option, FDMEE imports and also transforms (validates) the data by using the data load mappings that you defined. Therefore IMPSTATUS flag will not be set to 1 until the Validate step has completed.

    If you execute a load using the data workbench where the import and valdiate steps can be excuted autonomously this distinction would not matter as you would immediately see whether an import was successful or not .

    Ishti
  • Ishti
    Ishti Member Posts: 41 Red Ribbon
    edited Sep 7, 2015 12:25PM

    That is what I assumed. But wanted to be sure if we can implement any email process for only Successful Import. This will be required when we trigger only import process manually.

  • Ishti
    Ishti Member Posts: 41 Red Ribbon
    edited Sep 7, 2015 10:34PM Answer ✓

    I have tried printing the values of IMPSTATUS in both afterimport & befValidate script.

    The value for AfterImport is =0

    While that in BefValidate =1

    This proves that the value of the status flag for IMPSTATUS is changed after the script afterimport is run.

    Thanks for your time and help.

  • Payal Kapoor
    Payal Kapoor Member Posts: 36
    edited Sep 8, 2015 1:50AM

    Great! Pls mark the answers as "correct" or "helpful" per your judgement.

    Payal

  • Francisco Amores
    Francisco Amores Member Posts: 1,694 Bronze Crown
    edited Sep 8, 2015 8:23PM

    Ok,

    the fdmContext is initialized in every event script.

    Some of the properties they are only available/initialized in specific scripts.

    you can always print all fdmcontext properties at the beginning of every script to check which properties are available

    Cheers

    SH_INT
This discussion has been closed.