FetchDataTool
- class hana_ai.tools.df_tools.fetch_tools.FetchDataTool(connection_context: ConnectionContext, return_direct: bool = False, is_transform: bool = False)
This tool fetches data from a given table.
- Parameters:
- connection_contextConnectionContext
Connection context to the HANA database.
- Returns:
- pandas.DataFrame
The fetched data.
Note
args_schema is used to define the schema of the inputs as follows:
Field
Description
select_statement
The select_statement of dataframe. If not provided, ask the user. Do not guess.
top_n
The number of rows to fetch, it is optional
last_n
The number of rows to fetch from the end of the table, it is optional
- name: str
Name of the tool.
- description: str
Description of the tool.
- connection_context: ConnectionContext
Connection context to the HANA database.
- set_transform(is_transform: bool)
Return a copy of the tool with the is_transform flag set.
- Parameters:
- is_transformbool
Whether to set the tool to transform mode.