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

Allow specifying Spark resources per Python-Py Transformer #36

Open
yruslan opened this issue Sep 14, 2022 · 0 comments
Open

Allow specifying Spark resources per Python-Py Transformer #36

yruslan opened this issue Sep 14, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed Pramen-Py

Comments

@yruslan
Copy link
Collaborator

yruslan commented Sep 14, 2022

Background

Currently, Python transformations run with Spark resource settings configured per environment.
This is good if the cluster has dynamic resource allocation enabled. But for clusters that don't have dynamic resource allocation enabled it is not possible to fine-tune resources for each transformer.

Solution

Pramen-Py already supports specifying resources per transformer #30. Need to add the capability to Pramen.

Example

{
    name = "Python transformer"
    type = "python_transformation"
    python.class = "SomeTransformer"
    schedule.type = "daily"

    info.date.expr = "@runDate"

    output.table = "transformed_python"

    dependencies = [
      {
        tables = [ table1 ]
        date.from = "@infoDate"
      }
    ]

    spark.config {
      spark.executor.instances = 4
      spark.executor.cores = 1
      spark.executor.memory = "4g"
    }
}

Generated YAML:

run_transformers:
- info_date: 2022-02-18
  output_table: transformed_python
  name: SomeTransformer
  spark_config:
    spark.executor.cores: 1
    spark.executor.instances: 4
    spark.executor.memory: 4g

Docs on Spark config: https://spark.apache.org/docs/latest/configuration.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Pramen-Py
Projects
None yet
Development

No branches or pull requests

1 participant