maxframe.dataframe.read_odps_query#
- maxframe.dataframe.read_odps_query(query: str, odps_entry: ODPS = None, index_col: None | str | List[str] = None, string_as_binary: bool = None, sql_hints: Dict[str, str] = None, anonymous_col_prefix: str = '_anon_col_', skip_schema: bool = False, **kw)[source]#
Read data from a MaxCompute (ODPS) query into DataFrame.
Supports specifying some columns as indexes. If not specified, RangeIndex will be generated.
- Parameters:
query (str) – MaxCompute SQL statement.
index_col (Union[None, str, List[str]]) – Columns to be specified as indexes.
string_as_binary (bool, optional) – Whether to convert string columns to binary.
sql_hints (Dict[str, str], optional) – User specified SQL hints.
anonymous_col_prefix (str, optional) – Prefix for anonymous columns, ‘_anon_col_’ by default.
skip_schema (bool, optional) – Skip resolving output schema before execution. Once this is configured, the output DataFrame cannot be inputs of other DataFrame operators before execution.
- Returns:
result – DataFrame read from MaxCompute (ODPS) table
- Return type: