ETL

Component ID

2728473

Component name

ETL

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Overview

The ETL (Extract, Transform and Load) module gives the ability to export and denormalize any kind of content. Basically you are able to select content types or custom entities to be exported into a destination database. It also gives you the possibility to alter the data before persist it.

Requirements

This module requires the following modules:

Sponsorship

This project has been sponsored by CI&T.

Installation

No special installation requirements.

Configuration

* Mandatory configuration:

  • Set up the desired destination database on settings.php:
    $conf['etl_database_username'] = 'username';
    $conf['etl_database_password'] = 'password';
    $conf['etl_database_database'] = 'database';
    $conf['etl_database_host'] = 'localhost';
    $conf['etl_database_driver'] = 'pgsql';
    $conf['etl_database_port'] = '';
        
  • It is required to list all the desired entities to be exported.
    /**
     * Implements hook_etl_load_entities_info().
     */
    function MYMODULE_etl_load_entities_info() {
      return array(
        'article' => array(
          'entity' => 'node',
          'destination_table' => 'article',
          'bundle' => 'article',
        ),
      );
    }
        

* Useful hooks to alter entities data:

  • hook_etl_entity_load_data_alter(&$entity_data, $info); Gives you the possibility to change the entire data before it is persisted.
  • hook_etl_get_field_parser_value_alter(&$field_value, $machine_name, $field); Alter a specific field more granular.