DQL Documentation

Hello Dojo Community, where can I find more documentation on the DQL stuff?

I want to know how to tell the code to get all records which a given column string is like '%TEXT%'

 

Thanks in advance.

Best Answer

Answers

  • Thanks. It can work.

     

    I was expecting to recreate something like what was shown in the Advanced App Building course at DP19 with Cameron Williams:

     

    var dql = {
    columns: [
    {
    exprType: "COLUMN",
    column: "PrimaryInspector"
    },
    {
    exprType: "FUNCTION",
    name: "SUM",
    arguments: [{
    exprType: "COLUMN",
    column: "TotalTime"
    }]
    }
    ],
    groupByColumns: [{
    exprType: "COLUMN",
    column: "PrimaryInspector"
    }],
    where: {
    exprType: "EQUALS",
    rightExpr: {
    exprType: "COLUMN",
    column: "SecondaryInspector"
    },
    leftExpr: {
    exprType: "STRING_VALUE",
    value: "NESTOR MEZA"
    }
    }
    }

    domo.post('/dql/v1/mwp', dql, { contentType: 'application/json' }).then((data) => {
    var rows = [];
    data.rows.forEach(row =>{
    var obj = {};
    data.columns.forEach((column,i) => {
    obj[column] = row[i];
    });
    rows.push(obj);
    })
    console.table(data);
    })

    But it's kindda fuzzy so I'll go with traditional SQL for now

  • Oh interestings, I feel like their developer documentation is a little lacking, I've read through quite a bit but never came across doing it that way, maybe the documentation exists but I haven't seen it. 



    **Make sure to like any users posts that helped you and accept the ones who solved your issue.**
  • Hopefully some of the gurus sees this post and gives us a learning path on this topic.

     

    Thanks anyways! Robot Happy

This discussion has been closed.