Describe table to show columns/properties
I am trying to get table schema using desc or describe using SQL for which I am not able find an example. I see there are keywords reserved though in the documentation. Can anyone point me in right direction, please? Thanks
-
There isn't any easy way to achieve this with any language or any API except on a multidimensional database that has the cubes built with fixed dimensions and measures.
You should try to make your program guess the fields that are dimensions and the ones that could be a measure; a rule of thumb is that generally, the dimension fields are text data types, while the measures are numeric ones. Anyway a numeric field that could be used as a measure into a query could become a dimension in another one (e.g. used to build the dimension of a histogram). S there isn't anything that magically can guess for your use. the best you can do is to use a naming convention to know in advance which filed are dimension and which ones are measures
Please sign in to leave a comment.
Comments
11 comments