Python language implements Data warehouse development __python

Source: Internet
Author: User


Data Warehouse Architecture: Stg-ods-dw-rep/dm/other, Basic dimension date + product.

Use the Python language to implement the ETL work of MySQL to Oracle, file landing method.

Define HSS functions, program execution portals, define general.py public functions, and develop python.py scripts.

Data architecture, each layer based on business design specification rules

ETL work, Extract,transform,load,

Export file: The database itself exports statements,

Transform remotely get files, Python has packaged packages, and you can write your own

Load the file, the database itself statement,

Define file delimiters, define file formats

The implementation of HSS function, new HSS name sh text,

#!/usr/bin/bash

exec/usr/bin/python/$ $@ ($ is the argument script name $@ other parameter entry)

The following is the Python language design, check the environment configuration, get the parameter configuration (for SH parameters, and then pass to Python), to achieve flexible entry hss–s test.py–p etl_test–t 20170607, unlike pythontest.py arg1 arg2 Arg3 must specify the arguments for each bit.

HSS is actually an individual name, HSS = ' SH/PATH/HSS '

general.py defines a common function.

python.py script, which is a process that is called by the HSS function.

test.py

def Deal:

Try

Sql

Except

Abnormal


Template for the implementation of the Python language Data Warehouse development Annex

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.