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

Pipeline Configuration Transformation #4444

Closed
srikanthjg opened this issue Apr 19, 2024 · 0 comments · Fixed by #4446
Closed

Pipeline Configuration Transformation #4444

srikanthjg opened this issue Apr 19, 2024 · 0 comments · Fixed by #4446

Comments

@srikanthjg
Copy link
Contributor

srikanthjg commented Apr 19, 2024

Is your feature request related to a problem? Please describe.
Current DataPrepper configurations are very verbose and very tedious to write manually. With increasing number of processors and functionality in the DataPrepper, it would be difficult for the customers to know the correct processors to use with appropriate config options in correct sequence.
Secondly, some customer use cases might require multiple data-prepper pipelines even though their high level requirement is not very complex.

Describe the solution you'd like
Support transformation of pipeline configuration from user provided configuration to
a transformed configuration based on template and rules.

User config

simple-pipeline:
  source:
    someSource:
      hostname: "database.example.com"
      port: "27017"
  sink:   
    - opensearch:
       hosts: ["https://search-service.example.com"]
       index: "my_index"

Template

"<<pipeline-name>>-transformed":
  source: "<<$.*.someSource>>"
  sink:
    - opensearch:
       hosts: "<<$.*.sink[?(@.opensearch)].opensearch.hosts>>"
       port: "<<$.*.someSource.documentdb.port>>"
       index: "<<$.*.sink[0].opensearch.index>>"
       aws:
        sts_role_arn: "arn123"
        region: "us-test-1"
       dlq:
          s3:
              bucket: "test-bucket"

Rule

apply_when:
  - "$..source.someSource"

Expected Transformed Config

simple-pipeline-transformed:
  source:
    someSource:
      hostname: "database.example.com"
      port: "27017"
  sink:
    - opensearch:
        hosts: ["https://search-service.example.com"]
        port: "27017"
        index: "my_index"
        aws:
          sts_role_arn: "arn123"
          region: "us-test-1"
        dlq:
          s3:
            bucket: "test-bucket"


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

1 participant