{"id":19168380,"url":"https://github.com/bloomberg/datalake-metrics-db","last_synced_at":"2025-05-07T14:41:32.643Z","repository":{"id":39710465,"uuid":"426319096","full_name":"bloomberg/datalake-metrics-db","owner":"bloomberg","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-05T21:58:16.000Z","size":40,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-19T23:31:57.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloomberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-09T17:13:36.000Z","updated_at":"2025-03-07T01:29:34.000Z","dependencies_parsed_at":"2024-11-09T09:42:34.875Z","dependency_job_id":"740d91d0-85d8-4d9f-b9b4-4e606ed0ddc5","html_url":"https://github.com/bloomberg/datalake-metrics-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fdatalake-metrics-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fdatalake-metrics-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fdatalake-metrics-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fdatalake-metrics-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloomberg","download_url":"https://codeload.github.com/bloomberg/datalake-metrics-db/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897370,"owners_count":21821430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T09:42:28.944Z","updated_at":"2025-05-07T14:41:32.586Z","avatar_url":"https://github.com/bloomberg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datalake Metrics DB Migrations\n\nUses [Alembic](https://alembic.sqlalchemy.org/en/latest/) to create and run migration for a database that stores datalake query metrics.\n\n## Menu\n\n- [Rationale](#rationale)\n- [Installation](#installation)\n- [Contributions](#contributions)\n- [License](#license)\n- [Code of Conduct](#code-of-conduct)\n- [Security Vulnerability Reporting](#security-vulnerability-reporting)\n\n## Rationale\n\nThe purpose of this project is to offer safe migrations for upgrading and downgrading databases that store datalake query metadata and metrics.\n\n## Installation\n\nThis is meant to be used with [Trino](https://github.com/trinodb/trino) and models data based on Trino's query metrics. This has been tested with [Trino 379](https://github.com/trinodb/trino/releases/tag/379) and is backwards compatible to [Trino 363](https://github.com/trinodb/trino/releases/tag/363). Compatibility beyond this range is not guaranteed.\n\nBefore running this you will need to create a new database `datalake_analytics` with a schema called `datalake_metrics`. This is done by hand and is a one-time configuration.\n\nAlembic is set up to read an SQL connection string from the environment variable `SQLALCHEMY_URL`.\n\nYou may also set uncomment `sqlalchemy.url` in `alembic.local.ini` and set the connection string there.\n\nRun `alembic -c alembic.local.ini upgrade head` to upgrade the DB to the newest revision.\n\nRun `alembic -c alembic.local.ini downgrade -1` to downgrade the DB one revision.\n\n## Contributions\n\nWe :heart: contributions.\n\nHave you had a good experience with this project? Why not share some love and contribute code, or just let us know about any issues you had with it?\n\nWe welcome issue reports [here](../../issues); be sure to choose the proper issue template for your issue, so that we can be sure you're providing the necessary information.\n\nBefore sending a [Pull Request](../../pulls), please make sure you read our\n[Contribution Guidelines](https://github.com/bloomberg/.github/blob/master/CONTRIBUTING.md).\n\n## License\n\nPlease read the [LICENSE](LICENSE) file.\n\n## Code of Conduct\n\nThis project has adopted a [Code of Conduct](https://github.com/bloomberg/.github/blob/master/CODE_OF_CONDUCT.md).\nIf you have any concerns about the Code, or behavior which you have experienced in the project, please\ncontact us at opensource@bloomberg.net.\n\n## Security Vulnerability Reporting\n\nIf you believe you have identified a security vulnerability in this project, please send email to the project\nteam at opensource@bloomberg.net, detailing the suspected issue and any methods you've found to reproduce it.\n\nPlease do NOT open an issue in the GitHub repository, as we'd prefer to keep vulnerability reports private until\nwe've had an opportunity to review and address them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fdatalake-metrics-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloomberg%2Fdatalake-metrics-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fdatalake-metrics-db/lists"}