this thread could get very interesting.
My belief is that as long are you have conventions that promote software patterns and drive consistency you are on a great path.
I have been using the following:
_ - System fields. i.e. flags or section access fields. e.g. _SECTIONACCCESS
_ID - ID fields i.e. _IDEmployee
m- expression fields i.e. mRevenue - however i have stopped doing this with sense because of the master library
FACT, EMPLOYEE - i like shouting when defining a table.
tempFact - temp prefix for temporary tables
mapCountryCode - map prefix for mapping loads
- c – Colours
- d – Dates
- m – Measures or alternatively e - Expressions
- sa – Set Analysis
- a – Application
- t – Text
- v – Generic I.e. Counters
I also externally store variables in the following files.
- Vars.Colours.csv – colour definitions
- Vars.Measures.csv – measure definitions
- Vars.Calendar.csv – date and period defintions
- Vars.ETL.csv – ETL definitions
- Vars.Text.csv – textual string definitions
thank you for reading and mentioning QlikView Your Business 0 I'm glad people are learning something from it...
Here are my two cents about naming conventions:
- Fields that are likely to be used a Dimensions (Customer, Product, Supplier) should be spelled in the most user-friendly way, with no special characters and no extra qualifiers. This is done to avoid renaming in the Layout.
- Key fields are often being hidden, so it's good to settle on a single Hide Prefix in order to allow easy hiding. The commonly used "%" works just fine.
- All other fields are likely to be used in Expressions. Since most developers prefer typing their expressions (as opposed to using drop-down lists) and relying on IntelliSense auto-completion functionality, it's handy to start them with a common character:
- Starting all "measures" with the #-sign allows you to type # and get a short list of all "measures"
- Starting all "Flags" with the underscore "_" allows you to type _ and get a short list of all flags.
All variable names usually start with a lower case letter, followed by a camel-case field name. As a minimum, people use lower case "v" to differentiate variables from fields.
Many developers use different prefix letters for different purposes - c for color, f for filters, e for expressions.
Personally, I like to spell out the whole word instead of remembering what letter is used for what purpose. For example, "c" could be used for Color, or Condition, or Constant. You need to remember your abbreviation strategy...
In my own practice, I use the following:
color_Variable - for colors
exp_Variable - for expressions
filter_variable - for Set Analysis filters
fmt_Variable - for Format strings
vVariable - for common, general use Variables, typically carrying a value rather than a formula.
Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Munich, Germany!
Thanks for the informative reply, and of course, also for so much fantastic info. in QlikView Your Business. Also, for any other readers/followers of this thread, I'd certainly add that the book is equally valuable, both QlikView and for those of us interested in Qlik Sense -- the key logic is the same, and equally applicable.
P.s. Thought of one more yesterday: The pipe-character ("|"), which seems to be the preferred special character to use for concatenating composite keys