Giter Club home page Giter Club logo

ucfs-claimant-api-load-data's Introduction

DO NOT USE THIS REPO - MIGRATED TO GITLAB

Known Vulnerabilities Quality Gate Status

ucfs-claimant-api-load-data

Python Lambda to orchestrate loading data into RDS from S3 for UCFS Claimant API service

Note

For history prior to the creation of this repo (2020-04-24) refer to archived private repo dip/ucfs-claimant-load-data Additional information: Previously the application accepted in full S3 paths in the manifest, however due to a limitation with AWS Batch, the manifest character size has had to be shrunk. The S3 base path is supplied in the manifest as 's3_base_path'. It is the applications responsibility to build up the full S3 path for the objects.

Process

  1. All staging tables created by previous load are DROPPED
  2. New staging tables are created
  3. Data is loaded into staging tables with PK, data, and virtual columns
  4. Any rows with a NULL IDs are removed from the staging tables
  5. Unique constraints are added to the staging table ID columns
  6. Indices are added
  7. Live tables are renamed to _old
  8. Staging tables are renamed to become live tables

Building

docker build -t dwpdigital/ucfs-claimant-api-load-data .

Running

Sample manifest is provided for passing into main.py either directly or via docker run like this:

docker run -e "LOG_LEVEL=DEBUG" -e "AWS_DEFAULT_REGION=eu-west-2" dwpdigital/ucfs-claimant-api-load-data -m $(cat manifest.json.txt)
aws --profile dataworks-development --region eu-west-2 batch submit-job --job-name dan_cli --job-queue ucfs_claimant_api --job-definition ucfs_claimant_api_load_data_job --parameters manifest=$(cat manifest.json.txt)

ucfs-claimant-api-load-data's People

Contributors

dan-hill2802 avatar dataworks-ci avatar connoravo avatar mikew94 avatar tea-short avatar jjdmw avatar jonmelia avatar mike-iw avatar

Watchers

Stephen Moretti avatar Gavin Elliott avatar James Cloos avatar Daniel Chicot avatar Nathan Bigaignon avatar Malcolm Slater avatar rbryett avatar Dave Siddons avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.