Jitender Singh
11/07/2022, 2:40 PMIvana Gasparekova
11/07/2022, 3:27 PMIvana Gasparekova
11/07/2022, 3:29 PMconst insight = await backend.workspace(WORKSPACE).insights().getInsight(idRef("insight-id"))
const execution = backend.workspace(WORKSPACE).execution().forInsight(insight);
const result = await execution.execute();
const colsNum = result.dimensions[1].headers.length; // not sure about the [1], maybe it is [0] would need to test it
Jitender Singh
11/07/2022, 5:02 PMIvana Gasparekova
11/07/2022, 6:57 PMJitender Singh
11/09/2022, 2:57 PMheaders[0]
has length 1 and headers[1]
has length 2 and both has region columnJitender Singh
11/09/2022, 3:01 PMDan Homola
11/09/2022, 3:59 PMJitender Singh
11/09/2022, 5:11 PMDan Homola
11/10/2022, 8:19 AMimport { bucketsItems, idRef, insightBuckets } from "@gooddata/sdk-model";
const insight = await backend.workspace(WORKSPACE).insights().getInsight(idRef("insight-id"))
const approxCols = bucketsItems(insightBuckets(insight)).length
Jitender Singh
11/16/2022, 5:51 AM