Skip to content

Conversation

@RickiJay-WMDE
Copy link
Member

@RickiJay-WMDE RickiJay-WMDE commented Aug 28, 2025

Implemented most basic version:

  • /csv/metrics GET endpoint, does require the auth header
  • Runs a pre-configured SQL query, dumps the result in a CSV, returns file

1 row per Wiki, with the following columns:

  • wikibase_id
  • wikibase_type
  • base_url

From latest successful Quantity observation:

  • quantity_observation_date
  • total_items
  • total_lexemes
  • total_properties
  • total_triples
  • total_ei_properties
  • total_ei_statements
  • total_url_properties
  • total_url_statements

From latest successful Recent Changes observation:

  • recent_changes_observation_date
  • first_change_date
  • last_change_date
  • human_change_count
  • human_change_user_count
  • bot_change_count
  • bot_change_user_count

From latest successful Software Version observation:

  • software_version_observation_date
  • software_name -- ONLY MediaWiki
  • version -- MediaWiki version

@RickiJay-WMDE RickiJay-WMDE marked this pull request as ready for review August 29, 2025 12:21
@RickiJay-WMDE RickiJay-WMDE changed the title feat: Export CSVs feat: Export CSV Aug 29, 2025
@RickiJay-WMDE RickiJay-WMDE requested a review from a team September 1, 2025 15:53
Copy link
Contributor

@rti rti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in order to be usable for our use case, we have to be able to provide the auth header as a get parameter.

@RickiJay-WMDE RickiJay-WMDE requested a review from rti September 2, 2025 12:04
Copy link
Contributor

@rti rti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I offer #115 as a small simplification?

RickiJay-WMDE and others added 3 commits September 4, 2025 23:24
* fix: csv export without tmp file

* fix: do not use StreamingResponse
Co-authored-by: Robert Timm <rti@users.noreply.github.com>
@RickiJay-WMDE RickiJay-WMDE requested a review from rti September 8, 2025 08:06
@RickiJay-WMDE RickiJay-WMDE merged commit 9edb72a into main Sep 8, 2025
5 checks passed
@RickiJay-WMDE RickiJay-WMDE deleted the pandas branch September 8, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants