{"id":37857274,"url":"https://github.com/pilillo/gilberto","last_synced_at":"2026-01-16T16:28:35.715Z","repository":{"id":46693623,"uuid":"347340146","full_name":"pilillo/gilberto","owner":"pilillo","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-18T13:07:56.000Z","size":204,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-12T17:55:20.037Z","etag":null,"topics":["apache-spark","data-quality","data-quality-monitoring","dataops","k8s","scala","spark"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pilillo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-13T10:30:49.000Z","updated_at":"2022-07-02T05:12:44.000Z","dependencies_parsed_at":"2022-09-14T12:51:36.285Z","dependency_job_id":null,"html_url":"https://github.com/pilillo/gilberto","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pilillo/gilberto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilillo%2Fgilberto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilillo%2Fgilberto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilillo%2Fgilberto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilillo%2Fgilberto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pilillo","download_url":"https://codeload.github.com/pilillo/gilberto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilillo%2Fgilberto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apache-spark","data-quality","data-quality-monitoring","dataops","k8s","scala","spark"],"created_at":"2026-01-16T16:28:35.591Z","updated_at":"2026-01-16T16:28:35.699Z","avatar_url":"https://github.com/pilillo.png","language":"Shell","readme":"# Gilberto\n\nA nice guy you may rely on for your Data Quality;\n\n![Gilberto](img/gilberto_wide.png)\n\n## Pipelines\n\nGilberto uses [AWS Deequ](https://github.com/awslabs/deequ) and [Apache Spark](https://spark.apache.org/) at its core.\n\nSpecifically, you can instantiate:\n* `profile` to perform profiling of any Spark DataFrame - loaded from a Hive table\n* `suggest` to perform constraint suggestion based on selected data distribution\n* `validate` to perform a data quality validation step, based on an input ***check*** file\n* `detect` to perform anomaly detection, based on an input ***strategy*** file\n\nGilberto is meant to be run as a step within a workflow manager (e.g. with the workflow failing in case of data inconsistencies), pulling data from a remote Hadoop/Hive cluster or S3/Presto datalake and pushing data to specific MetricsRepositories.\n\n## Usage\n\nThe input arguments are handled using [scopt](https://github.com/scopt/scopt). Gilberto is expected a data source (either a Hive table or a path), an action (or pipeline) to perform on the data, as well as a time interval `(from, to)`, along with a destination file path.\nFor the validator, Gilberto also expects a repository target, an endpoint or a file path, along with a code config file specifying the checks to perform on source data.\nFor the profiler and the suggester, you may also specify a list of columns to use for partitioning the resulting dataframe,\nsuch as `PROC_YEAR,PROC_MONTH,PROC_DAY` to use processing date columns or respectively `START_*` and `END_*` for the beginning and end of the selected date interval.\n\nSpecifically:\n```bash\n  -a, --action action             Action is the pipeline to be run\n  -s, --source source             Source defines where to load data from\n  -d, --destination destination   Destination defines where to save results\n  -f, --from date                 Beginning of the time interval (default as yyyy-MM-dd)\n  -t, --to date                   End of the time interval (default as yyyy-MM-dd)\n  -r, --repository target         Target folder or endpoint of the repository\n  -c, --code-config-path path     Path of the file containing the checks to instruct the validator\n  -p, --partition-by columns      Columns to use to partition the resulting dataframe\n```\n\nHere an example check file `checks.gibo` for the `validate` step:\n```scala\nimport com.amazon.deequ.checks.{Check, CheckLevel, CheckStatus}\nSeq(\n  Check(CheckLevel.Error, \"data testing with error level\")\n    .hasSize(_ \u003e0)\n    .hasMin(\"numViews\", _ \u003e 12)\n)\n```\n\nThe file is interpreted as Scala code using reflection and applied as Checks (see [`addChecks`](https://github.com/awslabs/deequ/blob/master/src/main/scala/com/amazon/deequ/VerificationRunBuilder.scala#L86)) on a Validator instance.\n\nSimilarly, here is an example strategy file `strategy.gibo` for the `detect` step:\n```scala\nimport com.amazon.deequ.anomalydetection._\nimport com.amazon.deequ.analyzers._\n(\n  RelativeRateOfChangeStrategy(maxRateIncrease = Some(2.0)),\n  Size()\n)\n```\nwhich is interpreted as tuple of kind `AnomalyDetectionStrategy, Analyzer[S, DoubleMetric]` and applied to a Detector instance (see [anomaly detection example](https://github.com/awslabs/deequ/blob/master/src/main/scala/com/amazon/deequ/examples/anomaly_detection_example.md)).\n\n## Metrics repositories\n\nDeequ provides an [InMemoryMetricsRepository](https://github.com/awslabs/deequ/blob/master/src/main/scala/com/amazon/deequ/repository/memory/InMemoryMetricsRepository.scala) and a [FileSystemMetricsRepository](https://github.com/awslabs/deequ/blob/master/src/main/scala/com/amazon/deequ/repository/fs/FileSystemMetricsRepository.scala).\nThe former is basically a Concurrent Hashmap, while the second is a connector allowing for writing a json file of kind `metrics.json` to HDFS or S3. \nClearly, this has various drawbacks. Most of all, writing to a unique file blob all metrics does not scale and does not allow for querying from Presto and other engines alike.\n\nWe provide the following metrics repositories:\n* [`MastroMetricsRepository`](https://github.com/pilillo/gilberto/tree/master/src/main/scala/com/amazon/deequ/repository/mastro) pushing to the [Mastro](https://github.com/data-mill-cloud/mastro) catalogue and metrics repo; consequently allowing for lineage tracking and source discovery;\n* [`QuerableMetricsRepository`](https://github.com/pilillo/gilberto/tree/master/src/main/scala/com/amazon/deequ/repository/querable) based on the existing `FileSystemMetricsRepository` but writing DataFrames as partitioned parquet files instead of as a unique json file;\n\n## Deployment\n\n* [YARN](YARN_DEPLOY.md)\n* [K8s](K8S_DEPLOY.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilillo%2Fgilberto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilillo%2Fgilberto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilillo%2Fgilberto/lists"}