PHP code example of jishan-shk / laravel-databricks

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

    

jishan-shk / laravel-databricks example snippets


use JishanShk\Databricks\DatabricksClient;
use JishanShk\Databricks\Support\DatabricksSql;

$rows = app(DatabricksClient::class)->select(
    'SELECT * FROM reviews WHERE created_at >= '.DatabricksSql::quoteDate('2024-01-01')
);

$affected = app(DatabricksClient::class)->statement('DELETE FROM tmp_table');

use JishanShk\Databricks\Jobs\DatabricksWarmupJob;

DatabricksWarmupJob::dispatch();

$this->app->instance(\JishanShk\Databricks\OdbcDriver::class, new MyFakeDriver);