I am setting up an Azure Function for housekeeping my relational database.
I want to be able to control what table can be clear in which interval via Application Settings (i.e. env vaiable), so I am investigating the best way to insert multiple value in one application settings.
I currently have 2 ideas:
Use JSON, so the application settings will be something like this:
HOUSEKEEPING_VALUE={"table_a":3,"table_b":6}
After decoding the JSON format, I will clear table_a
in 3 months interval, table_b
in 6 months interval.
Use the same format as those used by Azure connection string x1=y1;x2=y2;x3=y3;
:
HOUSEKEEPING_VALUE=table_a=3;table_b=6;
Would like to ask the community, any other ways to achieve my goal which is more elegant? Or perhaps using JSON for my case is the norm? Thanks!
There are no elegant ways for multiple values stored in app setting in azure portal.
You should use the 2 solutions as mentioned in your question, then parse them by yourself.