Aita
  • Introduction
  • Roadmap
  • Aita Lab
    • Chat
    • Data Source
  • Architecture
  • Contribution
  • Getting Started
    • Quick Start
  • Installation
  • Reference
    • Aita agent
      • Pandas Agent
      • Pyarrow Agent
      • Python Agent
      • Spark Agent
      • SqlAgent
    • Data Sources
      • sql
      • File Data Source
      • Postgres Data Source
      • Snowflake Data Source
    • Aita tool
      • PythonTool
      • PandasTool
      • PyArrow Tool
      • pyspark tool
      • Sql Tools
  • Tech specs
    • Aita tech spec v1
Powered by GitBook
On this page
  1. Reference
  2. Aita agent

Spark Agent

Spark agent is an Aita agent specialize in writing spark code.

Example

python
from aita.agent.pyspark import PySparkAgent
from aita.datasource.postgresql import PostgreSqlDataSource 

datasource = PostgreSqlDataSource("postgresql://localhost:5432/db")
spark_configs = {
    "master": "local",
    "appName": "Aita"
}
spark_agent = PySparkAgent(spark_configs, "gpt-3.5-turbo")

spark_agent.stream("I want to get the top customers which making the most purchases")
PreviousPython AgentNextSqlAgent

Last updated 11 months ago