PHP code example of reedtechus / azure-data-explorer

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

    

reedtechus / azure-data-explorer example snippets


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);


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));