Skip to content

Commit

Permalink
chore: link to env variables when stating how to update the query
Browse files Browse the repository at this point in the history
  • Loading branch information
njuguna-n committed Nov 6, 2024
1 parent c878ec0 commit 6e63622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/en/hosting/analytics/building-dbt-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ To get the percentage of documents that have synced you can run the following qu
SELECT (COUNT(*) * 100 / (COUNT(*) + (SELECT SUM(pending) FROM v1.couchdb_progress))) AS sync_percentage FROM v1.couchdb;
```

This query selects the total number of documents that have been synced to the `v1.couchdb` table and divides it by the total number of documents that have been synced and the number of documents that are pending to be synced. This will give you the percentage of documents that have been synced. Update the table names to match the names of the tables in your database making sure to update the schema name as well. Run this query periodically to monitor the progress of the sync and stop the sync process once you get to the desired percentage. It's okay if it is not exactly 10% as long as it is close enough to give you an idea of the disk space required.
This query selects the total number of documents that have been synced to the `v1.couchdb` table and divides it by the total number of documents that have been synced and the number of documents that are pending to be synced. This will give you the percentage of documents that have been synced. Please note that the schema and table name could differ according to the [environment variables]({{< relref "hosting/analytics/environment-variables" >}}) you set so update them accordingly. Run this query periodically to monitor the progress of the sync and stop the sync process once you get to the desired percentage. It's okay if it is not exactly 10% as long as it is close enough to give you an idea of the disk space required.

You can then multiply this figure by 10 to get an estimate of the disk space required for the full dataset and then add some extra space for indexes and other overhead as well as future growth.

Expand Down

0 comments on commit 6e63622

Please sign in to comment.