PHP code example of tranch-xiao / php-thrift-impala

1. Go to this page and download the library: Download tranch-xiao/php-thrift-impala library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tranch-xiao / php-thrift-impala example snippets


// Load this lib
mpala 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();