Go Back
Excel to Postgres (Amazon RDS) Writer
Publisher
: Lingk
Run In Lingk
Description
This recipe reads data from an Excel spreadsheet and writes to a Postgres database on Amazon RDS. To run this recipe, configure an environment with a Local File (upload an Excel doc) and the Amazon RDS connector.
Browse the knowledge base
Twitter
E-Mail
# _____ _ _____ __ # | __ \ (_) |_ _| / _| # | |__) |___ ___ _ _ __ ___ | | _ __ | |_ ___ # | _ // _ \/ __| | '_ \ / _ \ | | | '_ \| _/ _ \ # | | \ \ __/ (__| | |_) | __/ _| |_| | | | || (_) | # |_| \_\___|\___|_| .__/ \___| |_____|_| |_|_| \___/ # | | # |_| # Project Name - EXCEL TO POSTGRES (AMAZON RDS) WRITER # Recipe ID - # Recipe URL - https://app.lingk.io/a/10932/tf/17956 # Description - # This recipe reads data from an Excel spreadsheet and writes to a Postgres database on Amazon RDS. # To run this recipe, configure an environment with a Local File (upload an Excel doc) and the Amazon RDS connector. # Industry - Higher Ed # Business Process - Graduate Reporting # Systems - AmazonRDS # Connectors - AmazonRDS, LocalFile # Data Flows - Single Direction # Connection Type - Excel to DB # Add Recipe notes / Change log information here! # _____ _ # / ____| | | # | | ___ _ __ _ __ ___ ___| |_ ___ _ __ ___ # | | / _ \| '_ \| '_ \ / _ \/ __| __/ _ \| '__/ __| # | |___| (_) | | | | | | | __/ (__| || (_) | | \__ \ # \_____\___/|_| |_|_| |_|\___|\___|\__\___/|_| |___/ # # CONNECTORS specify what data will be pulled into the in-memory database during processing connectors: # Configure LocalFile and AmazonRDS credentials in your Environment before running this recipe # LocalFile Setup - https://help.lingk.io/en/articles/126-local-file-connector-reference # AmazonRDS Setup - https://help.lingk.io/en/articles/264-amazon-rds-connector-setup-guide ###### Start - LocalFile connectors ###### - name: carData type: localFileReader format: excelFormat properties: fileName: rows_66k.xlsx ###### End - LocalFile connectors ###### ###### Start - AmazonRDS connectors ###### - name: RDSWriter type: AmazonRDSWriter properties: databaseType: "PostgreSQL" databaseName: "testaurant_db" tableName: "test_table" ###### End - AmazonRDS connectors ###### # ______ _ # | ____| | | # | |__ ___ _ __ _ __ ___ __ _| |_ ___ # | __/ _ \| '__| '_ ` _ \ / _` | __/ __| # | | | (_) | | | | | | | | (_| | |_\__ \ # |_| \___/|_| |_| |_| |_|\__,_|\__|___/ # FORMATS specify how files should be processed as they are being read or written to readFormats: - name: excelFormat type: excel properties: worksheets: "data" useHeader: "true" # _____ _ _ _ # / ____| | | | | | # | (___ | |_ __ _| |_ ___ _ __ ___ ___ _ __ | |_ ___ # \___ \| __/ _` | __/ _ \ '_ ` _ \ / _ \ '_ \| __/ __| # ____) | || (_| | || __/ | | | | | __/ | | | |_\__ \ # |_____/ \__\__,_|\__\___|_| |_| |_|\___|_| |_|\__|___/ # 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 *********************************************************************************************** # Inside statements you can do transformations, joins and aggrations - statement: | (carLog) => SELECT distinct int(car_year) c1, "true" c2 FROM carData - statement: (carLogCount) => SELECT count(*) FROM carLog #- statement: print carLogCount - statement: INSERT carLog INTO RDSWriter # Add more statements to convert, join, aggregrate, transform, and integrate your data
Data diff deltas on full datasets to event driven webhook subscriptions
Aggregate and append to large public data sources to Excel file