PHP ETL
  • Introduction
  • Getting Started
  • Extractors
    • Collection
    • CSV
    • Fixed Width
    • JSON
    • Query
    • Table
    • XML
  • Transformers
    • Convert Case
    • JSON Decode
    • JSON Encode
    • Rename Columns
    • Trim
    • Unique Rows
  • Loaders
    • Insert
    • Insert/Update
  • Helpers
  • Running Processes
Powered by GitBook
On this page
  • Options
  • Columns (required)
  1. Transformers

Rename Columns

Rename columns.

$etl->transform('rename_columns', $options);

Options

Columns (required)

Columns that will be transformed. The key is the old name and the value is the new column name.

Type

Default value

array

[]

$options = ['columns' => [
    'email_address' => 'email',
]];
PreviousJSON EncodeNextTrim

Last updated 6 years ago