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

Ingest: Support Container sources that produce a stream of URLs #944

Open
sergiimk opened this issue Nov 7, 2024 · 0 comments
Open

Ingest: Support Container sources that produce a stream of URLs #944

sergiimk opened this issue Nov 7, 2024 · 0 comments

Comments

@sergiimk
Copy link
Member

sergiimk commented Nov 7, 2024

#912 identified a use case where a very large number of files in S3 needs to be ingested.

While #943 proposes a simple solution for ingesting from S3 via glob patterns, it wouldn't scale to large number of files.

This ticket suggests a more flexible approach.

Using Container source user should be able to enable a special mode that tells Kamu that the STDOUT will be producing not data, but the URLs to files that should be ingested:

fetch:
  kind: Container
  image: "ghcr.io/kamu-data/fetch-my-dataset:0.1.0"
  yields: Urls  # Container will be returning URLs to Parquet files
  env:
    - name: AWS_API_KEY
read:
  kind: Parquet

This will allow users to write custom scripts that can list the files more efficiently using the knowledge of their data source structure.

The existing source state mechanism can be reused for such containers to keep track of where they left off.

Note: We further complicate and create more variety in ways to ingest data, which is unfortunate. It would be easy for us to say that user should just "push" data into the dataset when ingest gets complex, but this would not only require some automation on the user's side to get things running (as opposed to Kamu driving the process), but would also expose the user to the complexity of state management and error handling. Thus this extra type of ingest still seems justified.

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

No branches or pull requests

1 participant