1
0
mirror of synced 2025-12-25 02:09:19 -05:00

[Snowflake] Create certified source connector (#61535)

This commit is contained in:
Wenqi Hu
2025-07-09 12:23:49 -07:00
committed by GitHub
parent f4b273147f
commit 9bb0f19b96
38 changed files with 1223 additions and 2793 deletions

View File

@@ -1,50 +1,36 @@
# Snowflake Source
## Documentation
This is the repository for the Snowflake source connector, written in Kotlin.
- [User Documentation](https://docs.airbyte.io/integrations/sources/snowflake)
## Community Contributor
### Prerequisites
**To iterate on this connector, make sure to complete this prerequisites section.**
1. Look at the integration documentation to see how to create a warehouse/database/schema/user/role for Airbyte to sync into.
1. Create a file at `secrets/config.json` with the following format:
#### Build
To build the connector:
```
{
"host": "ACCOUNT.REGION.PROVIDER.snowflakecomputing.com",
"role": "AIRBYTE_ROLE",
"warehouse": "AIRBYTE_WAREHOUSE",
"database": "AIRBYTE_DATABASE",
"schema": "AIRBYTE_SCHEMA",
"credentials": {
"auth_type": "username/password",
"username": "AIRBYTE_USER",
"password": "SOMEPASSWORD"
}
}
./gradlew :airbyte-integrations:connectors:source-snowflake:build
```
3. Create a file at `secrets/config_auth.json` with the following format:
#### Run
Then run any of the connector commands as follows:
```
{
"host": "ACCOUNT.REGION.PROVIDER.snowflakecomputing.com",
"role": "AIRBYTE_ROLE",
"warehouse": "AIRBYTE_WAREHOUSE",
"database": "AIRBYTE_DATABASE",
"schema": "AIRBYTE_SCHEMA",
"credentials": {
"auth_type": "OAuth",
"client_id": "client_id",
"client_secret": "client_secret",
"refresh_token": "refresh_token"
}
}
docker run --rm airbyte/source-snowflake:dev spec
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-snowflake:dev check --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-snowflake:dev discover --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-snowflake:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
```
## For Airbyte employees
## Testing
### Unit Tests
To run unit tests:
```
./gradlew :airbyte-integrations:connectors:source-snowflake:test
```
To be able to run integration tests locally:
1. Put the contents of the `Source snowflake test creds (secrets/config.json)` secret on Lastpass into `secrets/config.json`.
1. Put the contents of the `SECRET_SOURCE-SNOWFLAKE_OAUTH__CREDS (secrets/config_auth.json)` secret on Lastpass into `secrets/config_auth.json`.
### Integration Tests
To run integration tests:
```
./gradlew :airbyte-integrations:connectors:source-snowflake:integrationTest
```