Coming soon: We’re working on a brand new, revamped Community experience. Want to receive updates? Sign up now!

0 votes

    I had a reporter that worked marvels until I started keeping historical records through partitioning. I cannot find the way to dynamically parse the ever changing json. What was once:

${(filter(parseJson(stepOutput_get_counts)["MY_PROJECT.my_table_NP"].computed, x,...

is now:

${(filter(parseJson(stepOutput_get_counts)["MY_PROJECT.my_table_2019-03-12"].computed, x,...

how can I get the CURRENT_DAY partition in the name there?




1 Answer

0 votes

For advanced usage of metrics such as partitioning, I would not advise using the ${} magic you were using before partitioning.

Instead, you can add a Python step in your scenario which retrieves the value of your metric for your CURRENT_DAY partition, and store it in a project variable called "myvar". You would then be able to use ${myvar} in your reporter. That way you have the full flexibility and simplicity of the Dataiku public API in your Python step. See for reference. You can easily prototype it first in a Python notebook, and then paste it into the Python scenario step.

Hope it helps,

1,337 questions
1,362 answers
11,912 users

©Dataiku 2012-2018 - Privacy Policy