Pass an advanced insights query dataset and return the identified query type as a string. This function uses variable name string matching to 'guess' the query type of the data frame.

identify_query(data, threshold = 2)

Arguments

data

An advanced insights query dataset in the form of a data frame. If the data is not identified as a valid dataset, the function will return an error.

threshold

Debugging use only. Increase to raise the 'strictness' of the guessing algorithm. Defaults to 2.

Value

String. A diagnostic message is returned.

Examples

identify_query(sq_data) # Standard query
#> [1] "Person Query"
identify_query(mt_data) # Meeting query
#> [1] "Meeting Query"
identify_query(em_data) # Hourly collaboration query
#> [1] "Hourly Collaboration Query"
if (FALSE) {
identify_query(iris) # Will return an error
identify_query(mtcars) # Will return an error
}