keboola / db-adapter-snowflake
1.4.0
2023-06-02 07:06 UTC
Requires
- php: ^8.0
- ext-odbc: *
Requires (Dev)
- keboola/coding-standard: >=7.0.2
- keboola/datadir-tests: ^5.3
- keboola/php-temp: ^2.0
- php-parallel-lint/php-parallel-lint: ^1.3
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5
- symfony/process: ^5.4
This package is auto-updated.
Last update: 2024-10-10 09:45:43 UTC
README
Development
- Clone this repository and init the workspace with following command:
git clone https://github.com/keboola/db-adapter-snowflake
cd db-adapter-snowflake
docker-compose build
docker-compose run --rm dev composer install --no-scripts
- Create snowflake user (supply your own password and warehouse name):
CREATE DATABASE "GHA_SNOWFLAKE_ADAPTER" DATA_RETENTION_TIME_IN_DAYS = 0;
CREATE ROLE "GHA_SNOWFLAKE_ADAPTER";
GRANT OWNERSHIP ON DATABASE "GHA_SNOWFLAKE_ADAPTER" TO ROLE "GHA_SNOWFLAKE_ADAPTER";
CREATE USER "GHA_SNOWFLAKE_ADAPTER"
PASSWORD = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
DEFAULT_ROLE = "GHA_SNOWFLAKE_ADAPTER";
GRANT ROLE "GHA_SNOWFLAKE_ADAPTER" TO USER "GHA_SNOWFLAKE_ADAPTER";
GRANT ROLE "GHA_SNOWFLAKE_ADAPTER" TO ROLE "ACCOUNTADMIN";
GRANT USAGE ON WAREHOUSE "DEV" TO ROLE "GHA_SNOWFLAKE_ADAPTER";
GRANT USAGE ON DATABASE "GHA_SNOWFLAKE_ADAPTER" TO ROLE "GHA_SNOWFLAKE_ADAPTER";
CREATE SCHEMA "GHA_SNOWFLAKE_ADAPTER"."GHA_SNOWFLAKE_ADAPTER";
GRANT ALL ON SCHEMA "GHA_SNOWFLAKE_ADAPTER"."GHA_SNOWFLAKE_ADAPTER" TO ROLE "GHA_SNOWFLAKE_ADAPTER";
- Fill credentials for created user in
.env
(required variables are in.env.dist
). - Run the test suite using this command:
docker-compose run --rm dev composer tests
License
MIT licensed, see LICENSE file.