如何将getschema用于customDimensions?

时间:2018-09-20 21:40:56

标签: azure-application-insights ms-app-analytics

我使用了类似的查询

Scanner sc = new Scanner(System.in);

    System.out.println("Would you like to continue? (y/n)");

    String cont = null;
    while(cont == null) {
        String unvalidatedString = sc.next();
        if (unvalidatedString.equalsIgnoreCase("y")) {
            cont = unvalidatedString;
            break;
        }
        if (unvalidatedString.equalsIgnoreCase("n")) {
            cont = unvalidatedString;
            break;
        }
        System.out.println("Please enter 'y' or 'n'");
    }

    // This is just added as a test case for you to verify that it's working. Remove from production code. 
    System.out.printf("The value of cont is: %s\n", cont);

获取包含requests | getschema 表中所有列的名称和类型的表。如何为requests获得相同的结果?

1 个答案:

答案 0 :(得分:0)

看起来可以使用buildschema来完成,然后将输出转换为可使用的格式(感谢Dmitry Matveev可以帮助我解决该问题):

requests
| summarize schema=buildschema(customDimensions)
| mvexpand bagexpansion=array schema
| project name=schema[0], type=schema[1]
相关问题