EHR Private Preview
EHR is a database for healthcare data. The Fivetran EHR connector supports electronic health record (EHR) applications with SQL Server as the underlying database, such as Epic Clarity.
Features
Feature Name | Supported | Notes |
---|---|---|
Capture deletes | ||
History mode | ||
Custom data | ||
Data blocking | ||
Column hashing | ||
Re-sync | ||
API configurable | ||
Priority-first sync | ||
Fivetran data models | ||
Private networking | ||
Authorization via API |
Setup guide
Follow our step-by-step EHR connector setup guide to set up your EHR connector.
Sync overview
Once Fivetran is connected to your database, we pull a full dump of all selected data from your database. We then pull all your new and changed data at regular intervals. If data in the source changes (for example, you add new tables or change a data type), Fivetran automatically detects and persists these changes to your destination.
Schema information
We prepend the source schema name with the connector name, followed by an underscore. We replicate the source's tables to the destination schema.
We name the destination schema with the connector name appended by the database schema name converted as per our schema naming rules. For example, if the connector name is epic_db
and the database schema name is fivetran_schema_#1
, the destination schema name is epic_db_fivetran_schema__1
. For more information, see our naming conventions documentation.
Fivetran-generated columns
Fivetran adds the following columns to every table in your destination:
_fivetran_deleted
(BOOLEAN) marks rows that were deleted in the source table_fivetran_synced
(UTC TIMESTAMP) indicates the time when Fivetran last successfully synced the row
We add these columns to give you insight into the state of your data and the progress of your data syncs. For more information about these columns, see our System Columns and Tables documentation.
Type transformation and mapping
As we extract your data, we match the data types from the source to data types that Fivetran supports. If we don't support a certain data type, we automatically change that type to the closest supported type or, for some types, don't load that data at all. Our system automatically skips columns with data types that we don't accept or transform.
The following table illustrates how we transform your database's data types into Fivetran-supported types:
SQL Server Type | Fivetran Type | Fivetran Supported | Notes |
---|---|---|---|
BIGINT | LONG | True | |
BINARY | BINARY | True | |
BIT | BOOLEAN | True | Not supported as primary keys for Teleport |
CHAR | STRING | True | |
DATE | LOCALDATE | True | |
DATETIME | LOCALDATETIME | True | |
DATETIME2 | LOCALDATETIME | True | |
DATETIMEOFFSET | TIMESTAMP | True | Not supported as primary keys for Teleport |
DECIMAL | BIGDECIMAL | True | |
FLOAT | DOUBLE | True | |
GEOMETRY | JSON | True | Not supported as primary keys for Teleport |
GEOGRAPHY | JSON | True | Not supported as primary keys for Teleport |
HIERARCHYID | STRING | True | |
IMAGE | BINARY | True | |
INTEGER | INTEGER | True | |
MONEY | BIGDECIMAL | True | |
NCHAR | STRING | True | |
NTEXT | STRING | True | |
NUMERIC | BIGDECIMAL | True | |
NVARCHAR | STRING | True | |
REAL | FLOAT | True | |
ROWVERSION | BINARY | True | |
SMALLDATETIME | LOCALDATETIME | True | |
SMALLMONEY | BIGDECIMAL | True | |
SMALLINT | SHORT | True | |
SQL_VARIANT | STRING | TRUE | Not supported as primary keys for Teleport |
TEXT | STRING | True | |
TIME | STRING | True | |
TIMESTAMP | BINARY | True | |
TINYINT | SHORT | True | |
UNIQUEIDENTIFIER | STRING | True | |
VARCHAR | STRING | True | |
VARBINARY | BINARY | True | |
XML | STRING | True |
We also support syncing user-defined data types. When you create a user-defined type in SQL Server, you are required to choose a base type. If Fivetran supports that base type, we automatically transform your user-defined type to its corresponding Fivetran type. For more information, see Microsoft's user-defined types documentation.
In some cases, when loading data into your destination, we may need to convert Fivetran data types into data types that are supported by the destination. This conversion can change either the data type itself or the parameterization on the data type. For more information, see the individual data destination pages in our Destinations documentation.
If we are missing an important type that you need, reach out to support.
Excluding source data
If you don’t want to sync all the data from your database, you can exclude schemas, tables, or columns from your syncs on your Fivetran dashboard. To do so, go to your connector details page and uncheck the objects you would like to omit from syncing. For more information, see our Data Blocking documentation.
Alternatively, you can change the permissions of the Fivetran user you created and restrict its access to certain tables or columns.
How to allow only a subset of tables
In your primary database, you can grant SELECT permissions to the Fivetran user on all tables in a given schema:
GRANT SELECT on SCHEMA::<schema> to fivetran;
or only grant SELECT permissions for a specific table:
GRANT SELECT ON [<schema>].[<table>] TO fivetran;
How to allow only a subset of columns
You can restrict the column access of your database's Fivetran user in two ways:
Grant SELECT permissions only on certain columns:
GRANT SELECT ON [<schema>].[<table>] ([<column 1>], [<column 2>], ...) TO fivetran;
Deny SELECT permissions only on certain columns:
GRANT SELECT ON [<schema>].[<table>] TO fivetran; DENY SELECT ON [<schema>].[<table>] ([<column X>], [<column Y>], ...) TO fivetran;
Initial sync
Once Fivetran is connected to your database, we replicate all the information we have SELECT permission to and add Fivetran-generated columns. For large tables, we copy a limited number of rows at a time so that we don't have to start the sync over from the beginning if our connection is lost midway. How many rows we copy at a time depends on whether your tables have clustered indices or not. For tables with clustered indices, we copy 500,000 rows at a time. For tables without clustered indices, we copy 5,000,000 rows at a time.
Updating data
Fivetran performs incremental updates of any new or modified data from your source database. During incremental updates, we request only the data that has changed since our last sync.
Standard sync
The database is subject to a backfill operation and change information is added into the table after we've already synced it and moved our cursor ahead. To ensure that we load every row and preserve data integrity, we may execute additional queries to include backfilled data.
Fivetran Teleport Sync
We leverage Fivetran Teleport Sync to capture changes when the required information is not present in the database. Teleport may be less performant than the standard sync, and any table synced with Teleport may sync slower than a table synced using our standard sync approach.