library php-thrift-impala
PHP Thrift Client for Impala and Hive Queries
tranch-xiao/php-thrift-impala
PHP Thrift Client for Impala and Hive Queries
- Thursday, September 3, 2015
- by Tranch
- Repository
- 2 Watchers
- 3 Stars
- 108 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 2 Versions
- 5 % Grown
PHP ThriftSQL
This project based Automattic/php-thrift-sql., (*1)
Currently the following engines are supported:, (*2)
-
Hive -- Over the HiveServer2 Thrift interface, SASL is enabled by default so username and password must be provided however this can be turned off with the
setSasl()
method before calling connect()
.
-
Impala -- Over the Impala Service Thrift interface which extends the Beeswax protocol.
Usage Example
// Load this lib
require_once __DIR__ . '/vendor/autoload.php';
// Try out an Impala query
$impala = new \ThriftSQL\Impala( 'hd-node1' );
$impalaTables = $impala
->connect()
->queryAndFetchAll( 'SHOW TABLES' );
print_r( $impalaTables );
// Don't forget to clear the client and close socket.
$impala->disconnect();