Describe table to show columns/properties

Comments

11 comments

  • Avatar
    Shawn Yarbrough

    try: SHOW CREATE TABLE tablename;

    0
    Comment actions Permalink
  • Avatar
    Naren Parimi

    This worked but not in a way we wanted it :slight_smile: -

    1. Can we use Describe?
    2. What is the equivalent of information schema in OmniSci?
    0
    Comment actions Permalink
  • Avatar
    anon23740792

    Currently we dont have an information schema - can you discuss what you are trying to do that requires it specifically?

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    hi @narenparimi,

    do you want output with the column name and other attributes without the create statement?

    right now we haven't a command to support it, but it's not too difficult to implement.

    0
    Comment actions Permalink
  • Avatar
    Naren Parimi

    Sure, We are trying to create a POC to build a data (catloging + profiler). The end user will have the ability to select a table and columns and profile them through UI.

    0
    Comment actions Permalink
  • Avatar
    Naren Parimi

    Yes - that is what we are trying to get to as well as give the end users ability to lookup a column/table by like name search.

    0
    Comment actions Permalink
  • Avatar
    Jagpreet Singh

    You can use \d tablename For Help \h

    0
    Comment actions Permalink
  • Avatar
    Ranjan

    Is there anyway to get measures and dimensions list ?

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    HI @Ranjan653,

    There isn't any metadata's attribute to mark a field as measure or dimension; what do you exactly need?

    0
    Comment actions Permalink
  • Avatar
    Ranjan

    I want to create two dropdowns (select fields) one populated with dimensions and other with measures. Is there any way to achieve this ?

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    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

    0
    Comment actions Permalink

Please sign in to leave a comment.