Canner / WrenAI

🚀 An open-source SQL AI (Text-to-SQL) Agent that empowers data, product teams to chat with their data. 🤘
https://getwren.ai/oss
GNU Affero General Public License v3.0
2.04k stars 211 forks source link

Feature: support dry run in preview API #402

Closed onlyjackfrost closed 5 months ago

onlyjackfrost commented 5 months ago

support dry run in preview API

Example

Request

mutation PreviewSql($data: PreviewSQLDataInput) { 
    previewSql(data: $data) 
}

{
  "data": {
    "dryRun": true,
    "limit": 1,
    "sql": "select * from public.orders"
  }
}

Response

{
    "data": {
        "previewSql": {
            "dryRun": true
        }
    }
}