mirror of
https://github.com/LukeHagar/pypistats.dev.git
synced 2025-12-09 12:47:48 +00:00
remove unused columns in query; fix for python versions with no . ie 27
This commit is contained in:
@@ -314,17 +314,14 @@ def get_query(date):
|
|||||||
WITH
|
WITH
|
||||||
dls AS (
|
dls AS (
|
||||||
SELECT
|
SELECT
|
||||||
country_code,
|
|
||||||
file.project AS package,
|
file.project AS package,
|
||||||
file.version AS package_version,
|
|
||||||
file.type AS file_type,
|
|
||||||
details.installer.name AS installer,
|
details.installer.name AS installer,
|
||||||
details.python AS python_version,
|
details.python AS python_version,
|
||||||
details.implementation.name AS python_implementation,
|
|
||||||
details.distro.name AS distro,
|
|
||||||
details.system.name AS system
|
details.system.name AS system
|
||||||
FROM
|
FROM
|
||||||
`the-psf.pypi.downloads{date.replace("-", "")}` )
|
`the-psf.pypi.downloads{date.replace("-", "")}`
|
||||||
|
WHERE
|
||||||
|
details.python LIKE '%.%' )
|
||||||
SELECT
|
SELECT
|
||||||
package,
|
package,
|
||||||
'python_major' AS category_label,
|
'python_major' AS category_label,
|
||||||
@@ -415,7 +412,7 @@ def etl():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
date = "2018-10-13"
|
date = "2018-10-23"
|
||||||
env = "prod"
|
env = "prod"
|
||||||
print(date, env)
|
print(date, env)
|
||||||
print(get_daily_download_stats(env, date))
|
print(get_daily_download_stats(env, date))
|
||||||
|
|||||||
Reference in New Issue
Block a user