Download the PHP package php-etl/sql-plugin without Composer
On this page you can find all versions of the php package php-etl/sql-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-etl/sql-plugin
More information about php-etl/sql-plugin
Files in php-etl/sql-plugin
Package sql-plugin
Short Description This plugin allows you to perform SQL queries in the ETL pipelines
License MIT
Informations about the package sql-plugin
SQL Plugin
What is it ?
The SQL plugin allows you to write your own SQL queries and use them into the Pipeline stack.
SQL, Structured Query Language, is a language for manipulating databases.
Installation
Usage
Database connection
The SQL plugin uses the PDO extension and relies on its interface to access databases using
the dsn
, username
and password
parameters.
This connection must be present in any case, whether it be when defining the extractor, loader or lookup.
It is possible to specify options at the time of this connection using options
. Currently, it is only possible to
specify if the database connection should be persistent.
Building an extractor
Building a lookup
Building a loader
Advanced Usage
Using params in your queries
Thanks to the SQL plugin, it is possible to write your queries with parameters.
If you write a prepared statement using named parameters (:param
), your parameter key in the configuration will be
the name of your parameter without the :
:
If you are using a prepared statement using interrogative markers (?
), your parameter key in the
configuration will be its position (starting from 1) :
Creating before and after queries
In some cases, you may need to run queries in order to best prepare for the execution of your pipeline.
Before queries
Before queries will be executed before performing the query written in the configuration. Often, these are queries that set up the database.
After queries
After queries will be executed after performing the query written in the configuration. Often, these are queries that clean up the database.
All versions of sql-plugin with dependencies
nikic/php-parser Version ^4.10
symfony/config Version ^6.0
symfony/expression-language Version ^6.0
php-etl/configurator-contracts Version 0.8.*
php-etl/satellite-toolbox Version *
php-etl/fast-map-plugin Version *
php-etl/packaging Version *