Provides the table-oriented read counterpart to fabric_kql_write_table().
It safely resolves the table through Kusto's table() function, optionally
projects columns and limits rows, then delegates typed result handling to
fabric_kql_query(). Use that lower-level function for filters, ordering,
joins, aggregations, or other KQL expressions.
Usage
fabric_kql_read_table(
cluster,
table,
database = NULL,
columns = NULL,
limit = NULL,
request_properties = list(),
timeout = 60,
retain_raw_frames = FALSE,
tenant_id = Sys.getenv("FABRICQUERYR_TENANT_ID"),
client_id = Sys.getenv("FABRICQUERYR_CLIENT_ID", unset =
"04b07795-8ddb-461a-bbee-02f9e1bf7b46"),
token = NULL,
auth_args = list()
)Arguments
- cluster
Query URI, or one Eventhouse or KQLDatabase object returned by
fabric_eventhouses(),fabric_kql_databases(), orfabric_item(). A KQLDatabase object also suppliesdatabase. Despite the argument name, use Fabric's Query URI here- table
KQL table name, or a record containing a
name,table, ordisplayNamefield.- database
KQL database display name. Supply it with a copied Query URI or an Eventhouse object; omit it when
clusteris a KQLDatabase object- columns
Optional unique column names to project.
- limit
Optional non-negative whole-number maximum number of rows to return, no greater than Kusto's signed 32-bit
takelimit.- request_properties
Named list of Kusto client request options, such as
servertimeout = "2m"ornotruncation = TRUE. Most users can leave this empty; these are server-side Kusto controls, not query parameters. Fabric does not supportqueryconsistencyorquery_weakconsistency_session_id- timeout
Positive client-side HTTP timeout in seconds. This is separate from the Kusto
servertimeoutrequest property- retain_raw_frames
Logical. Attach the complete decoded Kusto frame response as
kusto_raw_frames. KeepFALSEfor normal queries to avoid retaining a second copy of large result data, including on partial-error conditions- tenant_id
Microsoft Entra tenant ID. Defaults to
FABRICQUERYR_TENANT_ID- client_id
Microsoft Entra application/client ID. Defaults to
FABRICQUERYR_CLIENT_ID, with the Azure CLI application ID as fallback- token
Optional access token or token-provider function. Leave
NULLto let 'fabricQueryR' use its normal sign-in flow- auth_args
Additional sign-in options passed to
AzureAuth::get_azure_token()
Value
A typed tibble containing the selected table rows. Kusto metadata is
retained in the same attributes as fabric_kql_query().
Large results
The Kusto query HTTP response is collected and decoded in R. Use columns
and limit to bound an interactive read. For a result too large for client
memory, use fabric_kql_export() to export it server-side to OneLake or
another supported storage destination.
Examples
if (FALSE) { # \dontrun{
# Discover a KQL database instead of copying its Query URI and name
workspace <- fabric_workspaces()[[1L]]
database <- fabric_kql_databases(workspace)[[1L]]
# Choose an existing table shown under Tables in the Fabric KQL explorer
table <- Sys.getenv("FABRIC_KQL_TABLE")
# Read a bounded portion of that table into a tibble
events <- fabric_kql_read_table(
database,
table,
limit = 1000
)
} # }