Difference between revisions of "Writing data integration and data migration scenarios"

From Toolsverse Knowledge Base
Jump to: navigation, search
(Simple data migration scenario)
(Simple data migration scenario)
Line 50: Line 50:
 
# Load data into destination, which can be a database or files
 
# Load data into destination, which can be a database or files
 
# If destination tables don't exist create them on the fly (<metadata>true</metadata> flag)  
 
# If destination tables don't exist create them on the fly (<metadata>true</metadata> flag)  
extact
+
 
 +
What we don't do:
 +
# Specify what kind or source and destination we are working with
 +
# How to connect to the source and destination
 +
# How to create destination tables if they don't exist
  
 
== Using scripting languages ==
 
== Using scripting languages ==
  
 
== Using SQL ==
 
== Using SQL ==

Revision as of 21:07, 27 July 2014

Basic stuff

Any data integration or data migration process can be described as an extract-transform-load (ETL) or extract-load-transform (ELT). With that is mind writing scenario becomes a process of splitting task on extracts, loads and transformations. Scenario glues them all together and adds purpose and logic.

[ETL engine] which powers Toolsverse products uses XML-based language to create scenarios. Before reading this page please take a look at ETL scenario language specification. XML was a natural choice because it enforces a structure: loads follow extracts and transformations follow extracts and loads. That said you can chose to stream data so extract and load combined in one logical operation and run things in parallel where actual order of extracts and loads is not guarantee.

ETL engine makes it possible to concentrate on task in hands without reinventing the wheel. It hides complexity of data integration so in most cases the same techniques and language artifacts are used to work with any SQL and Non SQL data sources. It is however possible to use the full power of the target database and do things like direct data load, anonymous SQL blocks, etc.

Simple data migration scenario

Let take a look at the simple data migration scenario:

<?xml version="1.0" encoding="UTF-8"?>
<scenario>
     <name>Migrate data</name>
     <script>migrate_date</script>
     <driver>auto</driver>
     <sources>
          <source>
               <name>employee</name>
               <extract>
                    <sql>select * from employee</sql>
               </extract>
          </source>
 
          <source>
               <name>emp_resume</name>
               <extract>
                    <sql>select * from emp_resume</sql>
               </extract>
          </source>
    </sources>
     <destinations>
          <destination>
               <name>employee</name>
               <metadata>true</metadata>
          </destination>
 
          <destination>
               <name>emp_resume</name>
               <metadata>true</metadata>
          </destination>
     </destinations>
</scenario>

In this example we:

  1. Extract all data from employee and emp_resume tables in the source database
  2. Load data into destination, which can be a database or files
  3. If destination tables don't exist create them on the fly (<metadata>true</metadata> flag)

What we don't do:

  1. Specify what kind or source and destination we are working with
  2. How to connect to the source and destination
  3. How to create destination tables if they don't exist

Using scripting languages

Using SQL