PHPackages                             spyck/snowflake - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. spyck/snowflake

ActiveLibrary[Database &amp; ORM](/categories/database)

spyck/snowflake
===============

Snowflake SDK for PHP

1.4(1y ago)19.7k↓11.4%2MITPHPPHP ^8.1CI passing

Since Jan 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/willemverspyck/snowflake-sdk-php)[ Packagist](https://packagist.org/packages/spyck/snowflake)[ Docs](https://github.com/willemverspyck/snowflake-sdk-php)[ RSS](/packages/spyck-snowflake/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

Snowflake Api
=============

[](#snowflake-api)

Snowflake API connector in PHP

Requirements
------------

[](#requirements)

PHP ^8.1

Installation
------------

[](#installation)

Install it using [Composer](https://getcomposer.org/):

```
composer require spyck/snowflake
```

### 1. Generate own public and private keys:

[](#1-generate-own-public-and-private-keys)

```
openssl genrsa -out rsa_key.pem 2048
openssl rsa -in rsa_key.pem -pubout -out rsa_key.pub
```

### 2. Set the public key in Snowflake for the user:

[](#2-set-the-public-key-in-snowflake-for-the-user)

Set the public key for the user who will connect with the Snowflake API. Make sure that you put your own public key (rsa\_key.pub) in a single line.

```
ALTER USER  SET rsa_public_key = '';
```

### 3. Get public key from Snowflake:

[](#3-get-public-key-from-snowflake)

Run the describe command for the user to get the RSA\_PUBLIC\_KEY\_FP.

```
DESC USER ;
```

Example usage
-------------

[](#example-usage)

```
