Reputation: 11
I am working on a Laravel application with AWS Athena integration. Is there any way aws-php-sdk
(https://github.com/aws/aws-sdk-php-laravel) can be used for querying Athena data?
Upvotes: -1
Views: 2216
Reputation: 5144
Yes you can refer to AWS PHP SDK where you will find relevant API calls for Athena .For example if you want to run a query you can use below syntax. Refer to this for all Athena API calls.
Parameter Syntax
$result = $client->startQueryExecution([
'ClientRequestToken' => '<string>',
'QueryExecutionContext' => [
'Database' => '<string>',
],
'QueryString' => '<string>', // REQUIRED
'ResultConfiguration' => [ // REQUIRED
'EncryptionConfiguration' => [
'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS', // REQUIRED
'KmsKey' => '<string>',
],
'OutputLocation' => '<string>', // REQUIRED
],
]);
Upvotes: 3