Download the PHP package arminsam/db-data-importer without Composer

On this page you can find all versions of the php package arminsam/db-data-importer. 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-data-importer

DB Data Importer

DDI is a tool that enables data for specific topics in your application (e.g. products, orders, shipments, etc.) to be imported for the given ids (e.g. product id = 100,101,102) from a source database into a destination database.

A topic can be a single table, or a collection of related tables.

A source database is usually the production database where the data is exported from.

A destination database is usually the local database where the data is imported to.

The tool provides three commands, each for specific purpose:

  1. The cleanup commnad can be optionally used before an import to truncate all the tables within the provided context.
  2. The export command is used for exporting data and/or table schema into a .sql dump file.
  3. The import command is used for importing the generated .sql file into the destination database.

The tool lets you define three types of contexts to group your database tables into:

  1. Ignored Tables Context: should contain all tables in your application database that you don't care about their data in your local database (you only need their table schema and that's it!). The data for these tables are never going to be exported from the source database.
  2. Fixed Tables Context: should countain all tables in your application database that you only need their data imported once. Usually, the processes in your application only read data from these tables but not insert/update data in them.
  3. Operational Tables Context: should contain all tables in your application database that hold dynamic operational data. You are going to use topics within this context to import selective data that you need in your local database.

Use Cases

Some useful applications of this tool could be:

Configuration File

The configuration file is where you define your source and destination database connection data, as well as the contexts, topics, and table structures for your use case. There is an example di_config.php file inside the package root directory. In case you are using this package as a dependency in your application, you need to copy the config file to the root directory of your application.

Configuration For A Simple Online Shop Application

How to Use

You can start using the tool in one of the two ways below:

Running Cli Command

The tool comes with an executable script located in bin/data-importer (or vendor/bin/data-importer if you've installed it as a dependency of your application). Here are some ways you can use the cli command:

Using It In Your Application

You can also instantiate the DataImporterClient class in your code and use it as below:


All versions of db-data-importer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
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 arminsam/db-data-importer contains the following files

Loading the files please wait ....