Go Back
Append File Task
Publisher
:
Run In Lingk
Description
This recipe utilizes the Append task to append data from one source to a flat file output.
Browse the knowledge base
Twitter
E-Mail
# _____ _ _____ __ # | __ \ (_) |_ _| / _| # | |__) |___ ___ _ _ __ ___ | | _ __ | |_ ___ # | _ // _ \/ __| | '_ \ / _ \ | | | '_ \| _/ _ \ # | | \ \ __/ (__| | |_) | __/ _| |_| | | | || (_) | # |_| \_\___|\___|_| .__/ \___| |_____|_| |_|_| \___/ # | | # |_| # Project Name - Append File Task # Recipe URL - https://app.lingk.io/a/10932/tf/18558 # Description - This recipe utilizes the Append task to append data from one source to a flat file output. # Systems - # Connectors - LocalFile # Data Flows - Single Direction # Connection Type - Local Files # Add Recipe notes / Change log information here! # _____ _ # / ____| | | # | | ___ _ __ _ __ ___ ___| |_ ___ _ __ ___ # | | / _ \| '_ \| '_ \ / _ \/ __| __/ _ \| '__/ __| # | |___| (_) | | | | | | | __/ (__| || (_) | | \__ \ # \_____\___/|_| |_|_| |_|\___|\___|\__\___/|_| |___/ # # CONNECTORS specify what data will be pulled into the in-memory database during processing connectors: # Configure LocalFile connector in your Environment before running this recipe # LocalFile Setup - https://help.lingk.io/en/articles/126-local-file-connector-reference ###### Start - LocalFile Reader connectors ###### - name: sampleFile type: localFileReader format: excelFormat properties: fileName: mySecondSpreadsheet.xlsx ###### End - LocalFile Reader connectors ###### ###### Start - LocalFile Writer connectors ###### - name: convertedFile type: localFileWriter format: csvFormat staticFooterRef: footer task: fileToAppend properties: fileName: new_appended_file.csv ###### End - LocalFile Writer connectors ###### # ______ _ # | ____| | | # | |__ ___ _ __ _ __ ___ __ _| |_ ___ # | __/ _ \| '__| '_ ` _ \ / _` | __/ __| # | | | (_) | | | | | | | | (_| | |_\__ \ # |_| \___/|_| |_| |_| |_|\__,_|\__|___/ readFormats: - name: excelFormat type: excel properties: worksheets: data useHeader: "true" writeFormats: - name: csvFormat type: delimited properties: quoteAllFields: true delimiter: "," header: true # The imports section shows the data that needs to be appended imports: - name: header type: localFileImporter format: raw properties: fileName: staticHeaderFile.txt - name: footer type: localFileImporter format: raw properties: fileName: staticFooterFile.txt - name: fileToAppend type: localFileImporter format: raw properties: fileName: testdata.csv # _______ _ # |__ __| | | # | | __ _ ___| | _____ # | |/ _` / __| |/ / __| # | | (_| \__ \ <\__ \ # |_|\__,_|___/_|\_\___/ tasks: # The import reference is the csv file that needs to be appended - name: fileAppender type: append parameters: importerRef: fileToAppend # _____ _ _ _ # / ____| | | | | | # | (___ | |_ __ _| |_ ___ _ __ ___ ___ _ __ | |_ ___ # \___ \| __/ _` | __/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| # ____) | || (_| | || __/ | | | | | __/ | | | |_\__ \ # |_____/ \__\__,_|\__\___|_| |_| |_|\___|_| |_|\__|___/ # STATEMENTS specify how the data should be processed while in memory statements: #******************************************************************** D I S C L A I M E R *********************************************************************************************** # * # Note that in an effort to keep recipes optimized for DPH (Data Processing Hours), print statements should be commented out after development has concluded for a recipe. * # For more information on DPH optimization, please visit the following help article - https://help.lingk.io/en/articles/212-minimizing-data-processing-hours-on-the-lingk-platform * # * #******************************************************************** D I S C L A I M E R *********************************************************************************************** - statement: (dataCount) => select count(*) from sampleFile #- statement: print dataCount #### Start Insert sample file #### - statement: INSERT sampleFile INTO convertedFile #### End Insert sample file #### # Add more statements to convert, join, aggregrate, transform, and integrate your data
Graph QL Reader
Web Socket Adapter Reader