pbi_schema_relation_create {powerbiR} | R Documentation |
Define table relationship
Description
Defines a relationship between tables in a Power BI push dataset. To add this definition to a Power BI dataset schema, use pbi_schema_add_relations().
Usage
pbi_schema_relation_create(
from_table = NULL,
from_column = NULL,
to_table = NULL,
to_column = from_column,
direction = c("OneDirection", "BothDirections", "Automatic"),
name = paste0(from_table, to_table, from_column)
)
Arguments
from_table |
The name of the foreign key table |
from_column |
The name of the foreign key column |
to_table |
The name of the primary key table |
to_column |
The name of the primary key column. Defaults to from_column |
direction |
The filter direction of the relationship. Defaults to 'OneDirection' |
name |
The relationship name and identifier. Defaults to a concatenation of from_table, to_table and from_column |
Value
A data.table
Examples
# An example
[Package powerbiR version 0.1.0 Index]