Hi, can anyone tell me why underscores and caps ar...
# prefect-ui
d
Hi, can anyone tell me why underscores and caps are not accepted for block or variable names in the UI when the docs say that they should be allowed? Maybe a prefect setting I am missing? thx.
j
Hi Dan! Sounds like there’s a mismatch between the ui and the docs. Can you share the page of the docs you’re referring to? Thanks!
d
https://docs.prefect.io/2.13.1/api-ref/prefect/blocks/system/ - the examples given have upper case names and underscores
Says explicitly variable names can use underscores but once again the UI does not allow this
And again for variables, why not allow upper-case variable names like you would for environment variables?
I have a lot of variables in configuration in code which I am happy to store as blocks or variables in prefect - seems I always have to remap the character sets
Apologies I checked again and for variables underscores are allowed but not uppercase
j
Ok cool. Thanks for sharing. Let me take a look and get back to you
d
Much appreciated Jenny
j
Thanks for the patience. I had a quick look and I think the doc examples are using uppercase there as a placeholder not an example. "BLOCK_NAME" is representing where you'd put your block name! I can see that's confusing though. The actual variables section of the docs does a pretty good job of setting out that names should adhere to traditional naming conventions: https://docs.prefect.io/latest/guides/variables/?h=variables I can see an argument for adjusting those rules if there's a user demand for more flexibility. I'd encourage you to open an issue in the prefect repo so we can track interest in it