tris/php-odbc-impala

There is no license information available for the latest version (dev-master) of this package.

PHP connection Impala by cloudera ODBC Driver

dev-master 2020-04-26 07:12 UTC

This package is auto-updated.

Last update: 2024-04-26 16:33:47 UTC


README

Installation

Use [Composer] to install the package:

composer require tris/php-odbc-impala

环境依赖

unixODBC
php扩展pdo,pdo_odbc
Cloudera ODBC Driver for Impala

Example (For Laravel)

Laravel根目录下,config/app.php文件中providers添加Odbc\Impala\ImpalaServiceProvider::class

然后配置项aliases添加'Impala' => Odbc\Impala\Facades\Impala::class,

执行composer dump-autoload

执行php artisan vendor:publish --provider="Odbc\Impala\ImpalaServiceProvider"

修改自己的配置文件config/impala.php中的DSN,USER等

Demo

use Odbc\Impala\Facades\Impala;

$sql = "show databases";
$res = Impala::execute($sql);

Please contact me if you have any questions

Email: tris_10@sina.com

License

All contents of this package are licensed under the [MIT license].