Go Back
How to Stop a recipe via the 'Stop' Statement
Publisher
:
Run In Lingk
Description
This recipe shows how you can utilize a 'stop' statement to stop your recipe at a certain point in the recipe runtime.
Browse the knowledge base
Twitter
E-Mail
# _____ _ _____ __ # | __ \ (_) |_ _| / _| # | |__) |___ ___ _ _ __ ___ | | _ __ | |_ ___ # | _ // _ \/ __| | '_ \ / _ \ | | | '_ \| _/ _ \ # | | \ \ __/ (__| | |_) | __/ _| |_| | | | || (_) | # |_| \_\___|\___|_| .__/ \___| |_____|_| |_|_| \___/ # | | # |_| # Project Name - How to Stop a recipe via the 'Stop' Statement # Recipe URL - https://app.lingk.io/a/10932/tf/18410 # Description - This recipe shows how you can utilize a 'stop' statement to stop your recipe at a certain point in the recipe runtime. # Systems - # Connectors - JSON # Data Flows - Single Direction # Connection Type - Static Data # Add Recipe notes / Change log information here! # _____ _ # / ____| | | # | | ___ _ __ _ __ ___ ___| |_ ___ _ __ ___ # | | / _ \| '_ \| '_ \ / _ \/ __| __/ _ \| '__/ __| # | |___| (_) | | | | | | | __/ (__| || (_) | | \__ \ # \_____\___/|_| |_|_| |_|\___|\___|\__\___/|_| |___/ # # CONNECTORS specify what data will be pulled into the in-memory database during processing connectors: # Configure JSON connector in your Environment before running this recipe # JSON Setup - https://help.lingk.io/en/articles/74-json-connector-reference # This JSON contains static values that is used as the source data to be processed - name: students type: json properties: jsonObject: {"students":{"id":"1","names":[{"firstName":"John","lastName":"Thomas","fullname":"John Thomas"}],"email":"jthomas@gmail.com","credentials":[{"password":"AEIOU8901"},{"password":"pass123!"},{"password":"ABC123"}]}} - name: programs type: json properties: jsonObject: {"programs":{"id":"3456","code":"11234SAFFSA","title":"engineering"}} - name: studentProgram type: json properties: jsonObject: {"studentProgram":{"programId":"3456","student":"1","enrollmentStatus":[{"id":"2345","status":"deactivated"}]}} # _____ _ _ _ # / ____| | | | | | # | (___ | |_ __ _| |_ ___ _ __ ___ ___ _ __ | |_ ___ # \___ \| __/ _` | __/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| # ____) | || (_| | || __/ | | | | | __/ | | | |_\__ \ # |_____/ \__\__,_|\__\___|_| |_| |_|\___|_| |_|\__|___/ # STATEMENTS specify how the data should be processed while in memory statements: - statement: (getStudent) => select * from students - statement: print getStudent - statement: (getStudentCount) => select count(*) from students - statement: print getStudentCount - statement: (getProgram) => select * from programs - statement: print getProgram - statement: (getProgramCount) => select count(*) from programs - statement: print getProgramCount ################################################################################# S T O P ########################################################################################### # The STOP statement stops the ETL job running at a specific statement. Use the STOP statement for debugging purposes to execution smaller portions of a larger recipe and save time. - statement: stop ##################################################################################################################################################################################### # All the statements below won't be executed while running the integration due to the STOP statement above - statement: (getStudentProgram) => select * from studentProgram - statement: print getStudentProgram - statement: (getStudentProgramCount) => select count(*) from studentProgram - statement: print getStudentProgramCount # Add more statements to convert, join, aggregrate, transform, and integrate your data
Setting a page limit on the Ethos Connector
De-duplication Task - JSON Example