Tableau Migration SDK 5.1.1
  • Articles
  • Code Samples
  • Python API Reference
  • C# API Reference
Show / Hide Table of Contents
  • SDK Terminology
  • Configuration
  • Plan Validation
  • Logging
  • Hooks
    • Custom Hooks
    • Example Hook Use Cases
    • Python Hook Update from v3 to v4+
  • User Authentication
  • Custom View File
  • Dependency Injection
  • Troubleshooting

Hooks

A hook is a means of modifying the standard functionality of the Migration SDK. These modifications include filtering, mapping, transforming migration content and reacting to other SDK events.

The Migration SDK has default hooks that run for every migration.

Note

You can also write custom hooks to fit your specific use cases.

Types of Hooks

The Migration SDK has the following types of hooks, categorized broadly based on when they run.

Content

These types of hooks run on content items.

  • Filters: Used to exclude certain content items based on known criteria.

    Note

    Filters do not have a cascading effect. You will need to write similar filters or mappings for the related content items as well.

  • Mappings: Used to map a source item to something different at the destination. The original does not change.

  • Transformers: Used to change certain properties within various content types. A good example is permissions where the source and destination have different identifiers.

    Important

    Transformers that change properties like names and IDs erase references to the original. If that is not intended, you should use mappings instead.

General purpose

These types of hooks run before or after certain migration events.

  • Migration Initialized: Executed after preflight validation is completed successfully, but before any migration actions are started.

  • Post-Publish: Run on the destination content after the items for the content type have been published.

  • Bulk Post-Publish: Executed after publishing a batch of content, when bulk publishing is supported. You can make changes to the published set of items with this type of hook. You can write this type of hook for content types such as Users.

  • Migration Action Completed: Executed after the migration of each content type.

  • Batch Migration Completed: Executed after the completion of the migration of a batch of Tableau’s content.

Hook execution flow

This diagram displays how each hook is called as part of the migration process.

Hooks flowchart

Default Hooks

The plan builder may have pre-loaded hooks, called "Default" hooks. These are necessary due to inherent differences between Tableau Server and Tableau Cloud.

  1. Default Filters
  2. Default Mappings
  3. Default Post-Publish Hooks
  4. Default Transformers
  • Edit this page
In this article