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][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- param aiosession: aiohttp.ClientSession | None = None#
- param credential: TokenCredential | None = None#
- param dataset_id: str [Required]#
- param group_id: str | None = None#
- param impersonated_user_name: str | None = None#
- param sample_rows_in_table_info: int = 1#
- Constraints:
gt = 0
le = 10
- param schemas: Dict[str, str] [Optional]#
- param table_names: List[str] [Required]#
- param token: str | None = None#
- async aget_table_info(table_names: List[str] | str | None = None) str [source]#
Get information about specified tables.
- Parameters:
table_names (List[str] | str | None)
- 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: List[str] | str | None = None) str [source]#
Get information about specified tables.
- Parameters:
table_names (List[str] | str | None)
- 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.
Examples using PowerBIDataset