Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ingest): support writing configs to files #8696

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Aug 22, 2023

Adds the __DATAHUB_TO_FILE_ directive to our config loader.

Some sources (e.g. kafka, bigquery) require paths to files on a local file system. This doesn't work for UI ingestion, where the container needs to be totally self-sufficient.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Adds the `__DATAHUB_TO_FILE_` directive to our config loader.
@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Aug 22, 2023
@hsheth2 hsheth2 requested a review from asikowitz August 25, 2023 21:41
Copy link
Collaborator

@asikowitz asikowitz left a comment

Choose a reason for hiding this comment

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

I'm missing context on how we intend to use this feature. If this is just to help us run UI ingestions, this seems good. If we're going to suggest others do this, I could see it being confusing and would prefer generating these files in the relevant ConfigModel class rather than having users specify this behavior

@@ -67,12 +68,40 @@ def list_referenced_env_variables(config: dict) -> Set[str]:
return set([call[1][0] for call in calls])


WRITE_TO_FILE_DIRECTIVE_PREFIX = "__DATAHUB_TO_FILE_"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this notion of "directive" a yaml thing or something we've introduce before?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's part of "datahub-flavored yaml", which is something I just made up :)

this change is mainly to make it easy to run UI ingestion - don't expect this to be a common way we do things broadly

@hsheth2 hsheth2 merged commit 7b66c32 into datahub-project:master Aug 28, 2023
50 checks passed
@hsheth2 hsheth2 deleted the kafka-file branch August 28, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants