tranch-xiao / php-thrift-impala
PHP Thrift Client for Impala and Hive Queries
v0.1.2
2015-07-24 02:01 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-03-07 20:11:15 UTC
README
This project based Automattic/php-thrift-sql.
Currently the following engines are supported:
- 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 callingconnect()
. - 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();