MaxComputeAPIWrapper#

class langchain_community.utilities.max_compute.MaxComputeAPIWrapper(client: ODPS)[source]#

Interface for querying Alibaba Cloud MaxCompute tables.

Initialize MaxCompute document loader.

Parameters:

client (ODPS) โ€“ odps.ODPS MaxCompute client object.

Methods

__init__(client)

Initialize MaxCompute document loader.

from_params(endpoint, project, *[, ...])

Convenience constructor that builds the odsp.ODPS MaxCompute client from

lazy_query(query)

query(query)

__init__(client: ODPS)[source]#

Initialize MaxCompute document loader.

Parameters:

client (ODPS) โ€“ odps.ODPS MaxCompute client object.

classmethod from_params(endpoint: str, project: str, *, access_id: str | None = None, secret_access_key: str | None = None) โ†’ MaxComputeAPIWrapper[source]#
Convenience constructor that builds the odsp.ODPS MaxCompute client from

given parameters.

Parameters:
  • endpoint (str) โ€“ MaxCompute endpoint.

  • project (str) โ€“ A project is a basic organizational unit of MaxCompute, which is similar to a database.

  • access_id (str | None) โ€“ MaxCompute access ID. Should be passed in directly or set as the environment variable MAX_COMPUTE_ACCESS_ID.

  • secret_access_key (str | None) โ€“ MaxCompute secret access key. Should be passed in directly or set as the environment variable MAX_COMPUTE_SECRET_ACCESS_KEY.

Return type:

MaxComputeAPIWrapper

lazy_query(query: str) โ†’ Iterator[dict][source]#
Parameters:

query (str) โ€“

Return type:

Iterator[dict]

query(query: str) โ†’ List[dict][source]#
Parameters:

query (str) โ€“

Return type:

List[dict]