PHP code example of abetomo / convert-athena-query-results-to-array

1. Go to this page and download the library: Download abetomo/convert-athena-query-results-to-array 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/ */

    

abetomo / convert-athena-query-results-to-array example snippets



// ... startQueryExecution, etc.

$getQueryResultsResponse = $athenaClient->getQueryResults([
    'QueryExecutionId' => $queryExecutionId
]);
use Abetomo\ConvertAthenaQueryResultstoArray\ConvertAthenaQueryResultstoArray;
print "/// Original value\n";
print_r($getQueryResultsResponse->get('ResultSet'));
print "\n/// Convert to array \n";
print_r(ConvertAthenaQueryResultstoArray::convert(
    $getQueryResultsResponse->get('ResultSet'),
    true // $isSkipHeader
));