Nike-Inc / brickflow

Pythonic Programming Framework to orchestrate jobs in Databricks Workflow
https://engineering.nike.com/brickflow/
Apache License 2.0
183 stars 36 forks source link

[FIX] Cluster `policy_id` converted to scientific notation #107

Closed maxim-mityutko closed 4 months ago

maxim-mityutko commented 4 months ago

Closes #106

Description

Adding custom representer for yaml.dump to ensure that string values are enclosed in the quotation marks.

Related Issue

106

Motivation and Context

If any string value in the generated bundle.yaml can be interpretted as something other than a string, e.g. number in scientific notation, deployment to Databricks may / will fail. It definitly guarantees failed deployment when this case occurs for policy_id for cluster.

How Has This Been Tested?

I've used local installation of brickflow with this change to generate the updated bundle and successfully deployed it Databricks. Workflow was successfully created with the correct cluster setup and any other expected configuration.

Screenshots (if appropriate):

Types of changes

Checklist: