Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on January 13, 2023 8:41PM
Likes: 16
Replies: 7
User Story:
As a creator of formulas in Dataiku, I would like to be able to add comments in formulas, this would allow me to leave information in formulas about why formulas are configured the way that they are, increasing trust and communications, and it would allow the ability to "comment out" chunks of code while testing and debugging saving analyst and data scientist time.
Conditions of Satisfaction:
Nice to Have:
Notes:
I've tried SQL like "--" and " /* */ ", Python line comments "#", Java line comments '//'
Hi Tom,
Thanks for the feedback. We'll add this feature request to our backlog.
In the meantime, if you are using your formula in a Prepare recipe, you can add a comment in the step by clicking this button. This is not quite as powerful as comments directly in the code but this might help.
I have been using the Step notes for a while now. And they are helpful.
However, the real place I miss having "inline" comments is when working on / debugging a multi-line complicated formula. I find myself wanting to "comment out" section of a formula to debug small pieces of the formula. Now I have to copy out the original formula to a text editor, then copy chunks of the formula to see what each section of the formula is doing. Find the bug and re-integrate it into the longer formula. My formulas are not very complicated. Here is sort of a made up example.
if( and( coalesce(item_ages_between_18_and_26_months, 'false')
, diff(coalesce(closes_on, submitted_at, created_at)
, coalesce(item_created_date, created_at)
, 'months'
) <= ${Minimum_age_by_close_on_dt}
, or(coalesce(current_product_state, 'false')
,contains(current_status, 'legacy')
)
)
, inc(coalesce(submitted_at, created_at),-25,'months')
, create_dt
)
Finding out that I needed to uses some coalesce() in this to take care of missing data took a bit of work. Being able to comment out and check things would have helped.
I also feel that I would use inline comments for noting which things take care of items in the description in the item notes. Inline I might say why I coalesce to the specific value I used.
Just my $0.02 for the evening. Hope this further details helps.
Upvote, because in my first simple recipe I naturally wrote # then // into a formula and was surprised it didn't work
@fho
,
thanks for upvoting the idea.
Upvoting - same as the earlier comment, it would be extremely helpful to be able to add notes to long & complex formulas; look forward to seeing this capability.
@Tracy Thanks for upvoting this idea.