-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from bruin-data/feature/introduce-slack-source
Introduce slack as a source
- Loading branch information
Showing
10 changed files
with
613 additions
and
8 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
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,42 @@ | ||
# Slack | ||
|
||
[Slack](https://www.Slack.com/) is a messaging platform for teams and organizations where they can collaborate, share ideas and information. | ||
|
||
ingestr supports Slack as a source. | ||
|
||
## URI Format | ||
|
||
The URI format for Slack is as follows: | ||
|
||
```plaintext | ||
slack://?api_key=<api-key-here> | ||
``` | ||
|
||
URI parameters: | ||
|
||
- `api_key`: The API key used for authentication with the Slack API. | ||
|
||
The URI is used to connect to the Slack API for extracting data. | ||
|
||
## Setting up a Slack Integration | ||
|
||
Slack requires a few steps to set up an integration, please follow the guide dltHub [has built here](https://dlthub.com/docs/dlt-ecosystem/verified-sources/Slack#setup-guide). | ||
|
||
Once you complete the guide, you should have an API key with the necessary permissions as mentioned in the guide. Let's say your API key is axb-test-564. Here's a sample command that will copy the data from Slack into a DuckDB database: | ||
|
||
```sh | ||
ingestr ingest --source-uri 'slack://?api_key=axb-test-564' --source-table 'channels' --dest-uri duckdb:///slack.duckdb --dest-table 'dest.channels' | ||
``` | ||
|
||
The result of this command will be a table in the `slack.duckdb` database. | ||
|
||
## Available Tables | ||
|
||
Slack source allows ingesting the following sources into separate tables: | ||
|
||
- `channels`: Retrieves information about all the channels. | ||
- `users`: Retrieves information about all the users. | ||
- `messages:chan1,chan2`: Retrieves messages from specified channels, where chan1 and chan2 represent user-defined channels (e.g: general, memes). Multiple channels can be listed. | ||
- `access_logs`: Retrieves all the access logs. | ||
|
||
Use these as `--source-table` parameter in the `ingestr ingest` command. |
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
Oops, something went wrong.