Issue
I'm working in Python in a Jupyter Notebook and using data from a QuestDB instance.
The helper function I've defined to read data:
def query(q):
r = requests.get(f"http://{ip}:{port}/exp?query="+q)
rawData = r.text
df = pd.read_csv(io.StringIO(rawData))
return df
So using this query on the data:
query("select * from users")
Yields:
But if we then try to query back that data for the specific user_id
returned:
query("select * from users where user_id = 72")
What is returned is a No query text
error from QuestDB:
I already tried altering the data type, i.e. '72'
instead of 72
. What is weird is that I have other much more complex queries that work on other fields of the same table and return results.
Any help is appreciated!
Solution
The user_id
was indeed a string '72'
instead of 72
, and the QuestDB syntax for string equality is IN
.
So
query("select * from users where user_id in '72'")
solves the problem.
Answered By - zarnoevic
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.