reedtechus / azure-data-explorer
PHP SDK for Azure Data Explorer
Fund package maintenance!
reedtechus
Requires
- php: ^8.1
- sammyjo20/saloon: 2.0.0-beta3
Requires (Dev)
- laravel/pint: ^1.2
- pestphp/pest: ^1.20
- spatie/ray: ^1.28
This package is auto-updated.
Last update: 2025-03-09 18:52:36 UTC
README
PHP SDK for Azure Data Explorer
This project is a PHP library that allows you to connect to Azure Data Explorer and execute queries.
⚠️ Experimental: This package is still in development and is not ready for production use.
Breaking changes can still occur without a major version change until 1.0.0.
Goals
The goal of this project is to implement the Azure Data Explorer REST API in PHP.
Feature Roadmap
- Authentication
- Query
- Streaming Ingestion
- Management Commands
- Query v2
Installation
You can install the package via composer:
composer require reedtechus/azure-data-explorer
Usage
use ReedTech\AzureDataExplorer\AzureDataExplorerApi; $dataExplorer = new AzureDataExplorerApi( 'AZURE_TENANT_ID', 'AZURE_CLIENT_ID', 'AZURE_CLIENT_SECRET', 'AZURE_DATA_EXPLORER_REGION', 'AZURE_DATA_EXPLORER_CLUSTER', ); $results = $dataExplorer->query($query);
This returns a QueryResultsDTO
object (or throws an exception).
Using the results
dump('Columns: '.implode(', ', $results->columns)); dump('Number of Results: '.count($results->data)); dump('Execution Time: '.$results->executionTime); dump('First Row: '.print_r($results->data[0], true));
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
This package is not endorsed nor supported by Microsoft in any way.
License
The MIT License (MIT). Please see License File for more information.