Skip to content

Singer.io tap for extracting data from the Slack Web API

License

Notifications You must be signed in to change notification settings

envoy/tap-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack icon tap-slack

License: GPL v3 Python 3.7

Singer.io tap for extracting data from the Slack Web API

Installation

It is highly recommended installing tap-slack in it's own isolated virtual environment. For example:

python3 -m venv ~/.venvs/tap-slack
source ~/.venvs/tap-slack/bin/activate
pip3 install tap-slack
deactivate

Setup

The tap requires a Slack API token to interact with your Slack workspace. You can obtain a token for a single workspace by creating a new Slack App in your workspace and assigning it the relevant scopes. As of right now, the minimum required scopes for this App are:

  • channels:read
  • channels:history
  • users:read

Usage

It is recommended to follow Singer best practices when running taps either on their own or with a Singer target.

In practice, it will look something like the following:

~/.venvs/tap-slack/bin/tap-slack --config slack.config.json --catalog catalog.json | ~/.venvs/target-stitch/bin/target-stitch --config stitch.config.json

Replication

The Slack Conversations API does not natively store last updated timestamp information about a Conversation. In addition, Conversation records are mutable. Thus, tap-slack requires a FULL_TABLE replication strategy to ensure the most up-to-date data in replicated when replicating the following Streams:

  • Conversations
  • ConversationMembersStream
  • ConversationHistoryStream

The Users stream does store information about when a User record was last updated, so tap-slack uses that timestamp as a bookmark value and prefers using an INCREMENTAL replication strategy.

Table Schemas

Conversations

  • Table Name: conversations
  • Description:
  • Primary Key Column: id
  • Replication Strategy: FULL_TABLE
  • API Documentation: Link

Conversation Members

  • Table Name: conversation_members
  • Description:
  • Primary Key Column: N/A
  • Replication Strategy: FULL_TABLE
  • API Documentation: Link

Conversation History

  • Table Name: conversation_history
  • Description:
  • Primary Key Column: N/A
  • Replication Strategy: FULL_TABLE
  • API Documentation: Link

Users

  • Table Name: users
  • Description:
  • Primary Key Column: id
  • Replication Strategy: INCREMENTAL
  • API Documentation: Link

Releases

No releases published

Packages

No packages published

Languages