I'm trying to retrieve data from a GridDB container using the Python API, but it's not returning any results. Here's my code:
import griddb_python as griddb
factory = griddb.StoreFactory.get_instance()
store = factory.get_store(
host='localhost',
port=2406,
cluster_name='mycluster',
username='admin',
password='admin'
)
conInfo = griddb.ContainerInfo("mycontainer",
[["id", griddb.Type.INTEGER],
["name", griddb.Type.STRING]],
griddb.ContainerType.COLLECTION, True)
con = store.get_container(conInfo)
query = con.query("select * where id = ?", griddb.Type.INTEGER)
query.set_int(1, 1)
rs = query.fetch(False)
for row in rs:
print(row)
When I run this code, it doesn't print anything, even though I know there is data in the container with an ID of 1. What could be causing this, and how can I fix it?
I tried to look on the internet for a solution, but it seems nothing is working.