{"id":20130449,"url":"https://github.com/ravendb/ravendb-datahub-source","last_synced_at":"2026-06-05T02:31:24.112Z","repository":{"id":239016328,"uuid":"659244413","full_name":"ravendb/ravendb-datahub-source","owner":"ravendb","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-21T13:15:28.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-02T21:42:44.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/ravendb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-27T12:27:06.000Z","updated_at":"2023-07-25T08:11:12.000Z","dependencies_parsed_at":"2024-05-09T14:25:25.421Z","dependency_job_id":"96993ca9-4b19-4c86-9979-9b035a021d3d","html_url":"https://github.com/ravendb/ravendb-datahub-source","commit_stats":null,"previous_names":["ravendb/ravendb-datahub-source"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravendb/ravendb-datahub-source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fravendb-datahub-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fravendb-datahub-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fravendb-datahub-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fravendb-datahub-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravendb","download_url":"https://codeload.github.com/ravendb/ravendb-datahub-source/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravendb%2Fravendb-datahub-source/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33927314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-13T20:38:42.529Z","updated_at":"2026-06-05T02:31:24.096Z","avatar_url":"https://github.com/ravendb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ravendb-datahub-source\nRavenDB ingestion source for Datahub\n\n## How to use this package\nClone this package to your machine. \n\nInstall the pip package in your working environment (Datahub [recommends using Python environments](https://datahubproject.io/docs/cli/#using-pip)). Make sure the installation takes place in the environment where you are using the Datahub CLI to ingest metadata.\n\nFor the pip installation, use the following command from the parent directory:\n\n```\npip install ./ravendb-datahub-source\n```\nYou can verify the installation with the following command:\n```\npip show ravendb_datahub_source     \n```\n\nNow you are able to just reference your ingestion source class as a type in the YAML recipe by using the fully qualified package name.\n\n```\nsource:\n  type: ravendb_datahub_source.ravendb_source.RavenDBSource\n  config:\n  # place for your custom config defined in the configModel\n```\n\n\n## How to configure a RavenDB Source\n\nThe RavenDB source has to be configured within the Ingestion Job deployed in the Business Units, within a programmatic pipeline, or in a yaml configuration file (see [Ingestion Job](#ingestion-job)).\n\nThe source recipe accepts the following attributes: \n\n* **connect_uri**: RavenDB connection URI.\n* **database_pattern**: Regex patterns for databases to filter in ingestion (*AllowDenyPattern*, see below). Default: Allow all databases to be read.\n* **collection_pattern**: Regex patterns for tables to filter in ingestion. Specify regex to match the entire collection name in allowed databases. Default: Allow all databases to be read.\n* **enable_schema_inference**: Whether to infer a schema from the schemaless document database. Default: True.\n* **schema_sampling_size** (Optional): Number of documents to use when inferring schema size. If set to `0`, all documents will be scanned.  Default: 1000\n* **remove_metadata_from_schema**: Whether to remove @metadata field from schema. Default: True\n* **max_schema_size** (Optional): Maximum number of fields to include in the schema. If the schema is downsampled, a report warning will appear and the \"schema.downampled\" dataset property will be \"True\". Default: 300\n* **env**: Environment to use in namespace when constructing URNs. Default: \"PROD\"\n* **certificate_file_path** (Optional): Path to RavenDB client certificate file\n* **trust_store_file_path** (Optional): Path to trust store file\n\n\n\n\nThe *AllowDenyPattern* has the following structure:\n``{'allow': ['.*'], 'deny': [], 'ignoreCase': True}``\n\nFor RavenDB, it would probably make sense to ignore the [\\@hilo collection](https://ravendb.net/docs/article-page/5.4/csharp/studio/database/documents/documents-and-collections#the-@hilo-collection), as well as the [\\@empty collection](https://ravendb.net/docs/article-page/5.4/csharp/studio/database/documents/documents-and-collections#the-@hilo-collection). For this, you can simply apply the regex pattern as found in the sample programmatic pipeline and YAML below.\n\nHere is an **example of a programmatic pipeline** in Python:\n\n```python\npipeline = Pipeline.create(\n  {\n    \"run_id\": \"ravendb-test\",\n    \"source\": {\n        \"type\": \"ravendb_datahub_source.ravendb_source.RavenDBSource\",\n        \"config\": {\n            \"connect_uri\": \"http://localhost:8080\",\n            \"collection_pattern\":\n            {\n                'allow': [\".*\"],\n                'deny': [\"@.*\"],\n                'ignoreCase': True\n            },\n            \"schema_sampling_size\": 200,\n        },\n    },\n    # your sink configuration\n    \"sink\": {\n      \"type\": \"datahub-rest\",\n      \"config\": {\n          \"server\": \"http://datahub-datahub-gms.datahub.svc.cluster.local:8080\"\n      }\n    }\n  }\n)\n\n# to run the pipeline\npipeline.run()\n# print the source report\npipeline.pretty_print_summary()\n```\n\nThe corresponding starter **recipe in YAML format** would look like this:\n\n```\nsource:\n  type: ravendb_datahub_source.ravendb_source.RavenDBSource\n  config:\n    connect_uri: http://localhost:8080\n    collection_pattern:\n      allow: \n        - \".*\"\n      deny: \n        - \"@.*\"\n      ignoreCase: True\n    schema_sampling_size: 200\n\nsink:\n  # your sink configuration\n  type: datahub-rest\n  config:\n    server: http://datahub-datahub-gms.datahub.svc.cluster.local:8080\n\n```\nRunning this recipe is as simple as:\n```\ndatahub ingest -c ravendb_recipe.yaml\n```\n\n**Attention:**\n\nThe default port of the DataHub GMS (Generalized Metadata Service) is ``8080`` - the same as your default RavenDB port.\nIf you're running both on the same machine it can cause conflicts. \nTo avoid that, either\n* [Change the Datahub GMS port](https://datahubproject.io/docs/cli/#environment-variables-supported) (e.g. by changing the `DATAHUB_GMS_PORT`) or\n* [change the `ServerUrl` ](https://ravendb.net/docs/article-page/5.4/csharp/server/configuration/core-configuration)of your RavenDB\n\n## How to run the tests\n\nYou have to build and run the Docker image `RavendbTest.Dockerfile` from the parent directory using the following commands:\n\n```\ndocker build -f ./ravendb-datahub-source/RavendbTest.Dockerfile . -t test-ravendb\ndocker run -it -v /var/run/docker.sock:/var/run/docker.sock test-ravendb\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravendb%2Fravendb-datahub-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravendb%2Fravendb-datahub-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravendb%2Fravendb-datahub-source/lists"}