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

1. Go to this page and download the library: Download david50407/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/ */

    

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



// ... startQueryExecution, etc.

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