langchain_community.utilities.powerbi
.PowerBIDataset¶
- class langchain_community.utilities.powerbi.PowerBIDataset[source]¶
Bases:
BaseModel
Create PowerBI engine from dataset ID and credential or token.
Use either the credential or a supplied token to authenticate. If both are supplied the credential is used to generate a token. The impersonated_user_name is the UPN of a user to be impersonated. If the model is not RLS enabled, this will be ignored.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param aiosession: Optional[aiohttp.ClientSession] = None¶
- param credential: Optional[TokenCredential] = None¶
- param dataset_id: str [Required]¶
- param group_id: Optional[str] = None¶
- param impersonated_user_name: Optional[str] = None¶
- param sample_rows_in_table_info: int = 1¶
- Constraints
exclusiveMinimum = 0
maximum = 10
- param schemas: Dict[str, str] [Optional]¶
- param table_names: List[str] [Required]¶
- param token: Optional[str] = None¶
- async aget_table_info(table_names: Optional[Union[List[str], str]] = None) str [source]¶
Get information about specified tables.
- Parameters
table_names (Optional[Union[List[str], str]]) –
- Return type
str
- async arun(command: str) Any [source]¶
Execute a DAX command and return the result asynchronously.
- Parameters
command (str) –
- Return type
Any
- get_table_info(table_names: Optional[Union[List[str], str]] = None) str [source]¶
Get information about specified tables.
- Parameters
table_names (Optional[Union[List[str], str]]) –
- Return type
str
- run(command: str) Any [source]¶
Execute a DAX command and return a json representing the results.
- Parameters
command (str) –
- Return type
Any
- property headers: Dict[str, str]¶
Get the token.
- property request_url: str¶
Get the request url.
- property table_info: str¶
Information about all tables in the database.