You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/02/08 21:11:09 UTC

[libcloud] branch trunk updated: Add file with a couple of apache-libcloud PyPi package related BigQuery queries.

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8518aa0  Add file with a couple of apache-libcloud PyPi package related BigQuery queries.
8518aa0 is described below

commit 8518aa0ee097632d1bd8255ccbdf911f6fb0f91d
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Sat Feb 8 22:09:51 2020 +0100

    Add file with a couple of apache-libcloud PyPi package related BigQuery
    queries.
---
 misc/big_query_queries.txt | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/misc/big_query_queries.txt b/misc/big_query_queries.txt
new file mode 100644
index 0000000..fcad9d0
--- /dev/null
+++ b/misc/big_query_queries.txt
@@ -0,0 +1,40 @@
+# This file contains various useful BigQuery queries for retrieving PyPy
+# download related statistics for the apache-libcloud package
+
+# Number of downloads per file name, sorted by number of downloads
+SELECT file.filename, COUNT(*) AS num_downloads
+FROM `the-psf.pypi.downloads*`
+WHERE file.project = 'apache-libcloud'
+  AND _TABLE_SUFFIX
+    BETWEEN FORMAT_DATE(
+      '%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
+    AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
+  GROUP BY file.filename
+  ORDER BY num_downloads DESC
+  LIMIT 100
+
+# Download counts per Libcloud version, sorted by number of downloads
+SELECT REGEXP_EXTRACT(file.filename, r'apache[-\_]libcloud-(\d+.\d+.\d+r?c?\d?).*?$') version, COUNT(*) AS num_downloads
+FROM `the-psf.pypi.downloads*`
+WHERE file.project = 'apache-libcloud'
+  -- Only query the last 30 days of history
+  AND _TABLE_SUFFIX
+    BETWEEN FORMAT_DATE(
+      '%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
+    AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
+  GROUP BY version
+  ORDER BY num_downloads DESC
+  LIMIT 100
+
+# Download counts per Libcloud version, sorted by Libcloud version
+SELECT REGEXP_EXTRACT(file.filename, r'apache[-\_]libcloud-(\d+.\d+.\d+r?c?\d?).*?$') version, COUNT(*) AS num_downloads
+FROM `the-psf.pypi.downloads*`
+WHERE file.project = 'apache-libcloud'
+  -- Only query the last 30 days of history
+  AND _TABLE_SUFFIX
+    BETWEEN FORMAT_DATE(
+      '%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
+    AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
+  GROUP BY version
+  ORDER BY version DESC
+  LIMIT 100