Movatterモバイル変換


[0]ホーム

URL:


DOCS >INTEGRATIONS >SAAS >HEAP (V1)

Get started with a free trial today

Already have an account? Sign in

Heap (v1)

Heap extraction is supported by Stitch
This integration is powered bySinger's Heap tap and certified by Stitch.Check out and contribute to the repo on GitHub.

For support, contactSupport.

Heap integration summary

Stitch’s Heap integration replicates data from Avro files published to Amazon S3 via Heap’sConnect for Amazon S3 feature. Refer to theSchema section for a list of objects available for replication.

Heap feature snapshot

A high-level look at Stitch's Heap (v1) integration, including release status, useful links, and the features supported in Stitch.

STITCH
Release status

Released on February 13, 2019

Supported by

Stitch

Stitch plan

Standard

API availability

Available

Singer GitHub repository

singer-io/tap-heap

REPLICATION SETTINGS
Anchor Scheduling

Supported

Advanced Scheduling

Unsupported

Table-level reset

Unsupported

Configurable Replication Methods

Unsupported

DATA SELECTION
Table selection

Supported

Column selection

Supported

Select all

Supported

TRANSPARENCY
Extraction Logs

Supported

Loading Reports

Supported

Connecting Heap

Heap setup requirements

To set up Heap in Stitch, you need:

  • Access to Heap Connect using Amazon S3. Stitch’s Heap integration currently only replicates data from Heap Amazon S3 instances.

  • Permissions in AWS Identity Access Management (IAM) that allow you to create policies, create roles, and attach policies to roles. This is required to grant Stitch authorization to your S3 bucket.


Step 1: Retrieve your Amazon Web Services account ID

  1. Sign into your Amazon Web Services (AWS) account.
  2. Click theuser menu, located between thebell andGlobal menus in the top-right corner of the page.
  3. ClickMy Account.
  4. In theAccount Settings section of the page, locate theAccount Id field:

    An AWS account ID, highlighted in the AWS Account Settings page

Keep this handy - you’ll need it to complete the setup.

Step 2: Add Heap as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click theAdd Integration button.

  3. Click theHeap icon.

  4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

    For example, the name “Stitch Heap” would create a schema calledstitch_heap in the destination.Note: Schema names cannot be changed after you save the integration.

  5. In theS3 Bucket field, enter the name of the bucket. Enter only the bucket name: No URLs,https, or S3 parts. For example:heap-rs3-stitch-bucket
  6. In theAWS Account ID field, paste the account ID you retrieve inStep 1.

Step 3: Define the historical replication start date

The Sync Historical Data setting defines the starting date for your Heap integration. This means that dataequal to or newer than this date will be replicated to your data warehouse.

Change this setting if you want to replicate data beyond Heap’s default setting of1 year. For a detailed look at historical replication jobs, check out theSyncing Historical SaaS Data guide.

Step 4: Create a replication schedule

Replication schedules affect the time Extraction begins, not the time to data loaded. Refer to theReplication Scheduling documentation for more information.

In theReplication Frequency section, you’ll create the integration’sreplication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Heap integrations support the following replication scheduling methods:

To keep your row usage low, consider setting the integration to replicate less frequently. See theUnderstanding and Reducing Your Row Usage guide for tips on reducing your usage.

Step 5: Grant access to your bucket using AWS IAM

Note: To complete this step, you must have permissions in AWS Identity Access Management (IAM) that allow you to create/modify IAM policies and roles.

Next, Stitch will display aConfigure Your Heap Integration page. This page contains the info you need to configure bucket access for Stitch, which is accomplished via an IAM policy and role.

Note: Saving the integration before you’ve completed the steps below will result in connection errors.

Step 5.1: Create an IAM policy

An IAM policy is JSON-based access policy language to manage permissions to Heap resources.

For more info about the permissions the auto-generated policy Stitch IAM policy grants, click the link below.

Permission nameOperationDescription
s3:GetObjectGET Object

Allows for the retrieval of objects from Amazon S3.

HEAD Object

Allows for the retrieval of metadata from an object without returning the object itself.

s3:ListBucketGET Bucket (List Objects)

Allows for the return of some or all (up to 1,000) of the objects in a bucket.

HEAD Bucket

Used to determine if a bucket exists and access is allowed.

To create the IAM policy:

  1. In AWS,navigate to the IAM service by clicking theServices menu and typingIAM.
  2. ClickIAM once it displays in the results.
  3. On the IAM home page, clickPolicies in the menu on the left side of the page.
  4. ClickCreate Policy.
  5. In theCreate Policy page, click theJSON tab.
  6. Select everything currently in the text field and delete it.
  7. In the text field, paste the IAM policy from theConfigure Your Heap Integration page in Stitch.
  8. ClickReview policy.
  9. On theReview Policy page, give the policy a name. For example:stitch_heap
  10. ClickCreate policy.

Step 5.2: Create an IAM role for Stitch

Required permissions

To complete this step, you need the following AWS IAM permissions:CreateRole andAttachRolePolicy. Refer toAmazon’s documentation for more info.

Roles can’t be used for multiple integrations

If you’re creating multiple Heap integrations, you’ll need to complete this step for each integration you’re connecting.

TheRole Name Stitch uses to connect to the Amazon resource is unique to the integration. Attempting to re-use a role for multiple integrations will cause connection errors.

In this step, you’ll create an IAM role for Stitch and apply the IAM policy from the previous step. This will ensure that Stitch is visible in any logs and audits.

To create the role, you’ll need theAccount ID,External ID, andRole Name values provided on the StitchConfigure Your Heap Integration page.

  1. In AWS, navigate to theIAM Roles page.
  2. ClickCreate Role.
  3. On theCreate Role page:
    1. In theSelect type of trusted entity section, click theAnother AWS account option.
    2. In theAccount ID field, paste the Account ID from Stitch.Note: This isn’t your AWS account ID from Step 1 - this is the Account ID that displays in Stitch on theConfigure Your Heap Integration page.
    3. In theOptions section, check theRequire external ID box.
    4. In theExternal ID field that displays, paste the External ID from the StitchConfigure Your Heap Integration page:Account ID and External ID fields mapped from Stitch to AWS
    5. ClickNext: Permissions.
  4. On theAttach permissions page:
    1. Search for the policy you created in theprevious step.
    2. Once located, check the box next to it in the table.
    3. ClickNext: Tags.
  5. If you want to enter any tags, do so on theAdd tags page. Otherwise, clickNext: Review.
  6. On theReview page:
    1. In theRole name field, paste the Role Name from the StitchConfigure Your Heap Integration page:Role name field mapped from Stitch to AWS

      Remember: Role names are unique to the Stitch Heap integration they’re created for. Attempting to use the same role for multiple integrations will cause connection errors.

    2. Enter a description in theRole description field. For example:Stitch role for Heap integration.
    3. ClickCreate role.

Step 5.3: Check and save the connection in Stitch

Note: Saving the integration before you’ve completed the IAM policy and role steps will result in connection errors.

After you’ve created the IAM policy and role, you can save the integration in Stitch. When finished, clickCheck and Save.

Step 6: Set objects to replicate

Is an object missing or not replicating? Verify that the object meets the requirements forselection andreplication.

The last step is to select the tables and columns you want to replicate.Learn about the available tables for this integration.

Note: If a replication job is currently in progress, new selections won’t be used until the next job starts.

For Heap integrations, you can select:

  1. Individual tables and columns

  2. All tables and columns

Click the tabs to view instructions for each selection method.

  1. In the integration’sTables to Replicate tab, locate a table you want to replicate.
  2. To track a table, click thecheckbox next to the table’s name. A blue checkmark means the table is set to replicate.

  3. To track a column, click thecheckbox next to the column’s name. A blue checkmark means the column is set to replicate.

  4. Repeat this process for all the tables and columns you want to replicate.
  5. When finished, click theFinalize Your Selections button at the bottom of the screen to save your selections.
Important: Using theSelect All feature will overwrite any previous selections. However, selections aren’t final untilFinalize Your Selections is clicked. ClickingCancel will restore your previous selections.Refer to theSelect All guide for more info about this feature.
  1. Click into the integration from the Stitch Dashboard page.
  2. Click theTables to Replicate tab.

  3. In the list of tables, click the box next to theTable Names column.
  4. In the menu that displays, clickTrack all Tables and Fields:

    The Track all Tables and Fields menu in the Tables to Replicate tab

  5. Click theFinalize Your Selections button at the bottom of the page to save your data selections.

Initial and historical replication jobs

After you finish setting up Heap, itsSync Status may show asPending on either the Stitch Dashboard or in the Integration Details page.

For a new integration, aPending status indicates that Stitch is in the process of scheduling the initial replication job for the integration.This may take some time to complete.

Initial replication jobs with Anchor Scheduling

If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to theAnchor Scheduling documentation for more information.

Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.

Replication will continue after the seven days are over. If you’re no longer interested in this source, be sure topause ordelete the integration to prevent unwanted usage.

Heap replication

Replication in Stitch’s Heap integration depends on two factors:

  1. How Heap syncs data to your Amazon S3 bucket, and
  2. How Stitch identifies new data in Heap integrations

Heap data syncs to Amazon S3

Heap dumps data into Amazon S3 periodically.By default, this is on a nightly basis.

According to Heap’s documentation:

Heap will provide a periodic dump of data into S3 (nightly by default). Data will be delivered in the form of Avro-encoded files, each of which corresponds to one downstream table (though there can be multiple files per table). Dumps will be incremental, though individual table dumps can be full resyncs, depending on whether the table was recently toggled or the event definition modified.

This means that while files will only include new and updated data pertinent to that specific object (table), a full resync may be included.

Key-based Incremental Replication using file modification timestamps

To identify new and updated data for replication, Stitch will use file modification timestamps asReplication Keys and store them on a per-table basis. This means that only files dumped from a new Heap data sync will be selected for replication.

While data from Heap integrations is replicated usingKey-based Incremental Replication, the behavior for this integration differs subtly from other integrations.

The table below compares Key-based Incremental Replication andReplication Key behavior for Heap to that of other integrations.

HeapOther integrations
What's replicated during a replication job?

The entire contents of a modified file.

Only new or updated rows in a table.

What's used as a Replication Key?

The time a file is modified.

A column or columns in a table.

Are Replication Keys inclusive?

No. Only files with a modification timestamp value greater than the last saved bookmark are replicated.

Yes. Rows with a Replication Key valuegreater than or equal to the last saved bookmark are replicated.


Heap table reference

Schemas and versioning

Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.

The schema and info displayed below is forversion 1 of this integration.

This is the latest version of the Heap integration.

Custom attributes

Heap’s data model is dynamic, meaning it changes as custom attributes are added to object types in your account. For example: Adding new user attributes to theuser object.

This means that the Heap schema in your destination may also change over time as you add new attributes in Heap.

When a new attribute is added to an object in Heap, it will display as a selectable field in the Stitch app.Note: To include the field in replication, you’ll need to select it in Stitch. Stitch will not automatically select new fields.

The schema documentation following this section outlines the default attributes for each object type according toHeap’s documentation.

Event tables

For each event type you define in Heap, a table for that event will be available for selection in Stitch.

For example: If there’s aSign up - Click button event, there will be a table namedsign_up_click_button.

Refer to the[event_type] schema documentation for a list of default event attributes.

Note: When new event types are added in Heap, you will need to select the table and fields in Stitch to include it in replication.


Table and column names in your destination

Depending on your destination, table and column names may not appear as they are outlined below.

For example: Object names are lowercased in Redshift (CusTomERs >customers), while case is maintained in PostgreSQL destinations (CusTomERs >CusTomERs). Refer to theLoading Guide for your destination for more info.

event_tables

For every event type defined in Heap, a table will display in the Stitch app. The name of the table will be the event name, which Heap will first strip the non-alphanumeric characters from. For example: The table name forSign Up - Click Link will be transformed intosign_up_click_link by Heap.

Note: Custom attributes are supported for this table. As Heap schemas are dynamic, Stitch’sevent_tables documentation will only list the non-custom attributes outlined in Heap’s documentation.

Replication Method

Key-based Incremental

Primary Key

event_id

Useful links

Heap documentation

Join event_tables withon
pageviews
event_tables.event_id = pageviews.event_id
event_tables.session_id = pageviews.session_id
event_tables.user_id = pageviews.user_id
sessions
event_tables.event_id = sessions.event_id
event_tables.session_id = sessions.session_id
event_tables.user_id = sessions.user_id
user_migrations
event_tables.user_id = user_migrations.to_user_id
users
event_tables.user_id = users.user_id

IP

STRING

action_method

STRING

app_name

STRING

app_version

STRING

browser

STRING

carrier

STRING

city

STRING

country

STRING

device

STRING

device_type

STRING

event_id

STRING

hash

STRING

href

STRING

landing_page

STRING

library

STRING

path

STRING

platform

STRING

query

STRING

referrer

STRING

region

STRING

screen_ally_id

STRING

screen_ally_label

STRING

search_keyword

STRING

session_id

INTEGER

session_time

STRING

target_ally_id

STRING

target_ally_label

STRING

target_text

STRING

target_view_class

STRING

target_view_name

STRING

time

STRING

title

STRING

type

STRING

user_id

INTEGER

utm_campaign

STRING

utm_content

STRING

utm_medium

STRING

utm_source

STRING

utm_term

STRING

view_controller

STRING

pageviews

Thepageviews table contains info about pageviews.

Note: Custom attributes are supported for this table. As Heap schemas are dynamic, Stitch’spageviews documentation will only list the non-custom attributes outlined in Heap’s documentation.

Replication Method

Key-based Incremental

Primary Key

event_id

Useful links

Heap documentation

Join pageviews withon
event_tables
pageviews.event_id = event_tables.event_id
pageviews.session_id = event_tables.session_id
pageviews.user_id = event_tables.user_id
sessions
pageviews.event_id = sessions.event_id
pageviews.session_id = sessions.session_id
pageviews.user_id = sessions.user_id
user_migrations
pageviews.user_id = user_migrations.to_user_id
users
pageviews.user_id = users.user_id

IP

STRING

app_name

STRING

app_version

STRING

browser

STRING

carrier

STRING

city

STRING

country

STRING

device

STRING

device_type

STRING

event_id

STRING

hash

STRING

landing_page

STRING

library

STRING

path

STRING

platform

STRING

query

STRING

referrer

STRING

region

STRING

screen_ally_id

STRING

screen_ally_label

STRING

search_keyword

STRING

session_id

INTEGER

session_time

STRING

time

STRING

title

STRING

user_id

INTEGER

utm_campaign

STRING

utm_content

STRING

utm_medium

STRING

utm_source

STRING

utm_term

STRING

view_controller

STRING

sessions

Thesessions table contains info about sessions. In Heap, a web session ends after 30 minutes of user inactivity, while in iOS, a session ends after the app has entered the background.

Note: Custom attributes are supported for this table. As Heap schemas are dynamic, Stitch’ssessions documentation will only list the non-custom attributes outlined in Heap’s documentation.

Replication Method

Key-based Incremental

Primary Key

event_id

Useful links

Heap documentation

Join sessions withon
event_tables
sessions.event_id = event_tables.event_id
sessions.session_id = event_tables.session_id
sessions.user_id = event_tables.user_id
pageviews
sessions.event_id = pageviews.event_id
sessions.session_id = pageviews.session_id
sessions.user_id = pageviews.user_id
user_migrations
sessions.user_id = user_migrations.to_user_id
users
sessions.user_id = users.user_id

IP

STRING

app_name

STRING

app_version

STRING

browser

STRING

carrier

STRING

city

STRING

country

STRING

device

STRING

device_type

STRING

event_id

STRING

landing_page

STRING

library

STRING

platform

STRING

referrer

STRING

region

STRING

search_keyword

STRING

session_id

INTEGER

time

STRING

user_id

INTEGER

utm_campaign

STRING

utm_content

STRING

utm_medium

STRING

utm_source

STRING

utm_term

STRING

user_migrations

Theuser_migrations table contains info about user migrations.

Note: Custom attributes are supported for this table. As Heap schemas are dynamic, Stitch’suser_migrations documentation will only list the non-custom attributes outlined in Heap’s documentation.

Replication Method

Key-based Incremental

Primary Key

from_user_id

Useful links

Heap documentation

Join user_migrations withon
event_tables
user_migrations.to_user_id = event_tables.user_id
pageviews
user_migrations.to_user_id = pageviews.user_id
sessions
user_migrations.to_user_id = sessions.user_id
users
user_migrations.to_user_id = users.user_id

from_user_id

STRING

time

STRING

to_user_id

INTEGER

users

Theusers table contains info about users.

Note: Custom attributes are supported for this table. As Heap schemas are dynamic, Stitch’susers documentation will only list the non-custom attributes outlined in Heap’s documentation.

Replication Method

Key-based Incremental

Primary Key

user_id

Useful links

Heap documentation

Join users withon
event_tables
users.user_id = event_tables.user_id
pageviews
users.user_id = pageviews.user_id
sessions
users.user_id = sessions.user_id
user_migrations
users.user_id = user_migrations.to_user_id

email

STRING

handle

STRING

identity

STRING

joindate

STRING

last_modified

STRING

user_id

STRING

RelatedTroubleshooting

Questions? Feedback?

Did this article help? If you have questions or feedback, feel free tosubmit a pull request with your suggestions,open an issue on GitHub, orreach out to us.


[8]ページ先頭

©2009-2026 Movatter.jp