Download the PHP package laravel-gtm/snowflake-sdk without Composer
On this page you can find all versions of the php package laravel-gtm/snowflake-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package snowflake-sdk
Snowflake SDK for Laravel
A Laravel database driver for Snowflake using the REST SQL API and Saloon. No PHP extensions or ODBC drivers required.
Features
- Pure PHP implementation using Snowflake's REST API via Saloon v4
- Full Eloquent support with models and relationships
- Laravel Query Builder with Snowflake-specific SQL
- Migrations with Snowflake-specific column types
- ULID primary keys optimized for Snowflake clustering
- Native support for VARIANT, OBJECT, and ARRAY types
- Large result set streaming via partitions
- Bearer token authentication
Requirements
- PHP 8.4+
- Laravel 11.0+, 12.0+, or 13.0+
- Snowflake account with REST API access
Installation
The package will auto-register its service provider.
Configuration
1. Publish the config file
This creates config/snowflake-sdk.php with all available options.
2. Environment Variables
3. Database Configuration
Add the Snowflake connection to config/database.php:
Usage
Standalone SDK Usage
You can use the SDK directly without the database driver:
Timeouts
Set SNOWFLAKE_TIMEOUT to the maximum number of seconds a statement may run. The SDK sends this timeout to Snowflake and applies the same deadline while polling asynchronous statements. When the deadline is reached, the SDK requests cancellation and throws a SnowflakeException.
Override the configured timeout for one call with the context argument:
A timeout of 0, which is the default, disables the per-statement deadline.
Associative rows
Use fetchAssoc() when array rows are more convenient than the objects returned by fetchAll(). Keys are lowercase by default because Snowflake uppercases unquoted identifiers:
Pass false to preserve Snowflake's original column names, or stream associative rows from the result set:
Eloquent Models
Add the UsesSnowflake trait to any model that connects to Snowflake:
The trait automatically generates ULID primary keys and handles Snowflake timestamp formats.
Query Builder
Migrations
Snowflake Column Types
| Method | Snowflake Type |
|---|---|
id() |
CHAR(26) |
variant() |
VARIANT |
object() |
OBJECT |
array() |
ARRAY |
geography() |
GEOGRAPHY |
geometry() |
GEOMETRY |
timestampNtz() |
TIMESTAMP_NTZ |
timestampLtz() |
TIMESTAMP_LTZ |
timestampTz() |
TIMESTAMP_TZ |
number() |
NUMBER(p,s) |
identity() |
INTEGER IDENTITY |
Custom Casts
Warehouse & Role Switching
Transactions
Cursors
Development
Limitations
- No savepoints (Snowflake limitation)
- No row locking (Snowflake is append-only)
- No traditional indexes (use clustering keys instead)
License
MIT License. See LICENSE for details.
All versions of snowflake-sdk with dependencies
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
saloonphp/saloon Version ^4.0
saloonphp/laravel-plugin Version ^4.0