Hi team We found an issue with how Kedro handles e...
# questions
m
Hi team We found an issue with how Kedro handles empty runtime parameters when triggered from Airflow. In our pipeline config, we have something like:
Copy code
some_dataset:
  type: spark.SparkDataset
  file_format: delta
  filepath: "gs://<bucket-prefix>${runtime_params:env}-dataset/app_usages"
Airflow correctly sends an empty string (
''
)
for the
env
parameter, but Kedro interprets it as
None
. So the final path becomes:
Copy code
gs://<bucket-prefix>None-dataset/
instead of:
Copy code
gs://<bucket-prefix>-dataset/
Here’s the simplified Airflow call:
Copy code
"params": build_kedro_params(
    [
        f"project={get_project_id()}",
        f"env={env_param}",  # env_param = ''
        
    ]
)
It looks like Kedro converts empty strings from runtime parameters into
None
during parsing. Has anyone else run into this issue with Kedro interpreting empty strings as
None
?
c
A workaround could be to use a custom resolver.
Copy code
custom_resolver = {"env_param": lambda env_param: env_param if env_param else ""}
👍 1
m
Thanks I ll test it.