-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into nikki/docs/hybrid-docs
- Loading branch information
Showing
78 changed files
with
2,428 additions
and
514 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 |
---|---|---|
|
@@ -83,5 +83,3 @@ dagster-cloud serverless deploy-python-executable ./my-dagster-project \ | |
|
||
</TabItem> | ||
</Tabs> | ||
|
||
--- |
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
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,17 @@ | ||
AWS_ENDPOINT_URL= | ||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_BUCKET_NAME= | ||
AWS_ACCOUNT_ID= | ||
|
||
MOTHERDUCK_TOKEN= | ||
|
||
BSKY_LOGIN= | ||
BSKY_APP_PASSWORD= | ||
|
||
DBT_TARGET= | ||
|
||
AZURE_POWERBI_CLIENT_ID= | ||
AZURE_POWERBI_CLIENT_SECRET= | ||
AZURE_POWERBI_TENANT_ID= | ||
AZURE_POWERBI_WORKSPACE_ID= |
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,5 @@ | ||
tmp*/ | ||
storage/ | ||
schedules/ | ||
history/ | ||
atproto-session.txt |
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,52 @@ | ||
# project_atproto_dashboard | ||
|
||
An end-to-end demonstration of ingestion data from the ATProto API, modeling it with dbt, and presenting it with Power BI. | ||
|
||
![Architecture Diagram](./architecture-diagram.png) | ||
|
||
![Project asset lineage](./lineage.svg) | ||
|
||
## Features used | ||
|
||
1. Ingestion of data-related Bluesky posts | ||
- Dynamic partitions | ||
- Declarative automation | ||
- Concurrency limits | ||
2. Modelling data using _dbt_ | ||
3. Representing data in a dashboard | ||
|
||
## Getting started | ||
|
||
### Environment Setup | ||
|
||
Ensure the following environments have been populated in your `.env` file. Start by copying the | ||
template. | ||
|
||
``` | ||
cp .env.example .env | ||
``` | ||
|
||
And then populate the fields. | ||
|
||
### Development | ||
|
||
Install the project dependencies: | ||
|
||
pip install -e ".[dev]" | ||
|
||
Start Dagster: | ||
|
||
DAGSTER_HOME=$(pwd) dagster dev | ||
|
||
### Unit testing | ||
|
||
Tests are in the `project_atproto_dashboard_tests` directory and you can run tests using `pytest`: | ||
|
||
pytest project_atproto_dashboard_tests | ||
|
||
## Resources | ||
|
||
- https://docs.bsky.app/docs/tutorials/viewing-feeds | ||
- https://docs.bsky.app/docs/advanced-guides/rate-limits | ||
- https://atproto.blue/en/latest/atproto_client/auth.html#session-string | ||
- https://tenacity.readthedocs.io/en/latest/#waiting-before-retrying |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,6 @@ | ||
run_coordinator: | ||
module: dagster.core.run_coordinator | ||
class: QueuedRunCoordinator | ||
|
||
concurrency: | ||
default_op_concurrency_limit: 1 |
Empty file.
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,2 @@ | ||
[sqlfluff:rules:capitalisation.keywords] | ||
capitalisation_policy = upper |
13 changes: 13 additions & 0 deletions
13
examples/project_atproto_dashboard/dbt_project/dbt_project.yml
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,13 @@ | ||
name: "dbt_project" | ||
version: "1.0.0" | ||
config-version: 2 | ||
|
||
profile: "bluesky" | ||
|
||
target-path: "target" | ||
clean-targets: | ||
- "target" | ||
- "dbt_packages" | ||
|
||
models: | ||
+materialized: table |
14 changes: 14 additions & 0 deletions
14
examples/project_atproto_dashboard/dbt_project/models/analysis/activity_over_time.sql
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,14 @@ | ||
WITH final AS ( | ||
SELECT | ||
date_trunc('day', created_at) AS post_date, | ||
count(DISTINCT post_text) AS unique_posts, | ||
count(DISTINCT author_handle) AS active_authors, | ||
sum(likes) AS total_likes, | ||
sum(replies) AS total_comments, | ||
sum(quotes) AS total_quotes | ||
FROM {{ ref("latest_feed") }} | ||
GROUP BY date_trunc('day', created_at) | ||
ORDER BY date_trunc('day', created_at) DESC | ||
) | ||
|
||
SELECT * FROM final |
Oops, something went wrong.