-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(integration/fivetran): Fivetran connector integration (#9018)
Co-authored-by: Harshal Sheth <[email protected]>
- Loading branch information
1 parent
353584c
commit e73e926
Showing
20 changed files
with
1,777 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
## Integration Details | ||
|
||
This source extracts the following: | ||
|
||
- Connectors in fivetran as Data Pipelines and Data Jobs to represent data lineage information between source and destination. | ||
- Connector sources - DataJob input Datasets. | ||
- Connector destination - DataJob output Datasets. | ||
- Connector runs - DataProcessInstances as DataJob runs. | ||
|
||
## Configuration Notes | ||
|
||
1. Fivetran supports the fivetran platform connector to dump the log events and connectors, destinations, users and roles metadata in your destination. | ||
2. You need to setup and start the initial sync of the fivetran platform connector before using this source. Refer [link](https://fivetran.com/docs/logs/fivetran-platform/setup-guide). | ||
3. Once initial sync up of your fivetran platform connector is done, you need to provide the fivetran platform connector's destination platform and its configuration in the recipe. | ||
|
||
## Concept mapping | ||
|
||
| Fivetran | Datahub | | ||
|--------------------------|--------------------------------------------------------------------------------------------------------| | ||
| `Connector` | [DataJob](https://datahubproject.io/docs/generated/metamodel/entities/datajob/) | | ||
| `Source` | [Dataset](https://datahubproject.io/docs/generated/metamodel/entities/dataset/) | | ||
| `Destination` | [Dataset](https://datahubproject.io/docs/generated/metamodel/entities/dataset/) | | ||
| `Connector Run` | [DataProcessInstance](https://datahubproject.io/docs/generated/metamodel/entities/dataprocessinstance) | | ||
|
||
Source and destination are mapped to Dataset as an Input and Output of Connector. | ||
|
||
## Current limitations | ||
|
||
Works only for Snowflake destination for now. | ||
|
||
## Snowflake destination Configuration Guide | ||
1. If your fivetran platform connector destination is snowflake, you need to provide user details and its role with correct privileges in order to fetch metadata. | ||
2. Snowflake system admin can follow this guide to create a fivetran_datahub role, assign it the required privileges, and assign it to a user by executing the following Snowflake commands from a user with the ACCOUNTADMIN role or MANAGE GRANTS privilege. | ||
|
||
```sql | ||
create or replace role fivetran_datahub; | ||
|
||
// Grant access to a warehouse to run queries to view metadata | ||
grant operate, usage on warehouse "<your-warehouse>" to role fivetran_datahub; | ||
|
||
// Grant access to view database and schema in which your log and metadata tables exist | ||
grant usage on DATABASE "<fivetran-log-database>" to role fivetran_datahub; | ||
grant usage on SCHEMA "<fivetran-log-database>"."<fivetran-log-schema>" to role fivetran_datahub; | ||
|
||
// Grant access to execute select query on schema in which your log and metadata tables exist | ||
grant select on all tables in SCHEMA "<fivetran-log-database>"."<fivetran-log-schema>" to role fivetran_datahub; | ||
|
||
// Grant the fivetran_datahub to the snowflake user. | ||
grant role fivetran_datahub to user snowflake_user; | ||
``` | ||
|
||
## Advanced Configurations | ||
|
||
### Working with Platform Instances | ||
If you've multiple instances of source/destination systems that are referred in your `fivetran` setup, you'd need to configure platform instance for these systems in `fivetran` recipe to generate correct lineage edges. Refer the document [Working with Platform Instances](https://datahubproject.io/docs/platform-instances) to understand more about this. | ||
|
||
While configuration of platform instance for source system you need to provide connector id as key and for destination system provide destination id as key. | ||
|
||
#### Example - Multiple Postgres Source Connectors each reading from different postgres instance | ||
```yml | ||
# Map of connector source to platform instance | ||
sources_to_platform_instance: | ||
postgres_connector_id1: | ||
platform_instance: cloud_postgres_instance | ||
env: PROD | ||
|
||
postgres_connector_id2: | ||
platform_instance: local_postgres_instance | ||
env: DEV | ||
``` | ||
#### Example - Multiple Snowflake Destinations each writing to different snowflake instance | ||
```yml | ||
# Map of destination to platform instance | ||
destination_to_platform_instance: | ||
snowflake_destination_id1: | ||
platform_instance: prod_snowflake_instance | ||
env: PROD | ||
|
||
snowflake_destination_id2: | ||
platform_instance: dev_snowflake_instance | ||
env: PROD | ||
``` | ||
43 changes: 43 additions & 0 deletions
43
metadata-ingestion/docs/sources/fivetran/fivetran_recipe.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
source: | ||
type: fivetran | ||
config: | ||
# Fivetran log connector destination server configurations | ||
fivetran_log_config: | ||
destination_platform: snowflake | ||
destination_config: | ||
# Coordinates | ||
account_id: "abc48144" | ||
warehouse: "COMPUTE_WH" | ||
database: "MY_SNOWFLAKE_DB" | ||
log_schema: "FIVETRAN_LOG" | ||
|
||
# Credentials | ||
username: "${SNOWFLAKE_USER}" | ||
password: "${SNOWFLAKE_PASS}" | ||
role: "snowflake_role" | ||
|
||
# Optional - filter for certain connector names instead of ingesting everything. | ||
# connector_patterns: | ||
# allow: | ||
# - connector_name | ||
|
||
# Optional -- A mapping of the connector's all sources to its database. | ||
# sources_to_database: | ||
# connector_id: source_db | ||
|
||
# Optional -- This mapping is optional and only required to configure platform-instance for source | ||
# A mapping of Fivetran connector id to data platform instance | ||
# sources_to_platform_instance: | ||
# connector_id: | ||
# platform_instance: cloud_instance | ||
# env: DEV | ||
|
||
# Optional -- This mapping is optional and only required to configure platform-instance for destination. | ||
# A mapping of Fivetran destination id to data platform instance | ||
# destination_to_platform_instance: | ||
# destination_id: | ||
# platform_instance: cloud_instance | ||
# env: DEV | ||
|
||
sink: | ||
# sink configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.