cnosdb / cnosdb/cnosdb-client-python

[Bug] Table creation failed via cursor.execute func

Open
#4 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

An error occurred when I want to create a table via `cursor.execute` function.

You can reproduce as below:

```python
conn.create_database("tf_demo")
conn.switch_database("tf_demo")
print(conn.list_database())

cursor.execute(f"CREATE TABLE [IF NOT EXISTS] sunspot (date STRING, mssn DOUBLE,);")
```

```shell
ERROR:root:Invalid syntax or Object not exists, get ERROR from database : HTTP Error 422: Unprocessable Entity
[{'Database': 'public'}, {'Database': 'tf_demo'}]

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the cursor.execute implementation and reproduce the CREATE TABLE statement shown in the issue against the selected tf_demo database. Check how the statement is sent to CnosDB and use the reported HTTP 422 response to narrow the failure. Done means the example creates the table successfully without the syntax or object-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.