Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Included Comments for dependents.go #322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/collector/depsdev/dependents.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ const (
// TODO: prune root dependents that come from the same project.
// TODO: count "# packages per project" to determine dependent ratio

/*
The SQL statement below is two different queries that are used to query data from BigQuery.
The first query, dataQuery, creates a temporary table rawDependentCounts which holds
information about the name, version, system, and dependent count of dependencies.
This table is created by joining two other tables, Dependencies and PackageVersions,
and counting the number of dependencies for each name, version, and system.

The second query, countQuery, selects the DependentCount from a table specified by the ProjectID, DatasetName,
and TableName placeholders. The table is filtered by the ProjectName and ProjectType parameters,
which are passed as @projectname and @projecttype respectively.
*/

const dataQuery = `
CREATE TEMP TABLE rawDependentCounts(Name STRING, Version STRING, System STRING, DependentCount INT)
AS
Expand Down