Download the PHP package keboola/db-extractor-common without Composer

On this page you can find all versions of the php package keboola/db-extractor-common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package db-extractor-common

Database Extractor Common [DBC]


Common classes for creating vendor specific database extractors.

Extractors using DBC

Development and running tests

docker compose build
docker compose run --rm tests  # runs the tests

Usage

Add the library to your component's composer:

php composer.phar require db-extractor-common

composer.json

{
  "require": "db-extractor-common": ^8.0
}

Usage

Create entrypoint script file run.php like this one for Mysql extractor: https://github.com/keboola/db-extractor-mysql/blob/master/src/run.php

Note that as of version 7, configuration rows are supported so it is not necessary to support .yml configs or table array configurations.

The $config is loaded from the config.json file. You have to provide values for the data_dir and extractor_class keys. extractor_class is the main class of derived extractor, it should extend Keboola\DbExtractor\Extractor\Extractor.

You will need to implement the following methods:

Note that to support identifier sanitation, the getTables method should return a sanitizedName property for each column. This sanitizedName should be created using Keboola\php-utils\sanitizeColumnName

If you want to implement incremental fetching, you must implement
validateIncrementalFetching(array $table, string $columnName, ?int $limit = null): void
Please see the sample in the Common class: https://github.com/keboola/db-extractor-common/blob/master/src/Keboola/DbExtractor/Extractor/Common.php#L52

The namespace of your extractor class shoud be Keboola\DbExtractor\Extractor and the name of the class should corespond to DB vendor name i.e. PgSQL, Oracle, Impala, Firebrid, DB2 and so on.

Please check the existing implementations above for help getting started.

Check username

Check username functionality compares

If enabled, values must be same to run the component.

If a service account is used, check is skipped. For more information see UsernameChecker class.

Example image / stack parameters

Service account can be defined by regular expression:

Or user account can be defined by regular expression (inverted logic):

License

MIT licensed, see LICENSE file.


All versions of db-extractor-common with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
ext-pdo Version *
keboola/common-exceptions Version ^1.1
keboola/csv Version ^3.2
keboola/db-extractor-adapter Version ^1.14
keboola/db-extractor-config Version ^1.15
keboola/db-extractor-ssh-tunnel Version ^1.3.0
keboola/db-extractor-table-format Version ^3.8
keboola/php-component Version ^10.0
keboola/php-datatypes Version ^7.2
keboola/php-utils Version ^2.3||^3.0||^4.0
keboola/retry Version ^0.5
monolog/monolog Version ^2.0
nette/utils Version ^3.0
phpunit/phpunit Version ^9.1
pimple/pimple Version ^3.3
psr/log Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package keboola/db-extractor-common contains the following files

Loading the files please wait ....