I have a mysql db set up on RDS on AWS (I ported the db from my personal computer), and have set up a datajoint connection to the db on Sagemaker in a Jupyter notebook. Say I have a table mouse
, which has a column mouse_id
. Datajoint returns the same mouse.size_on_disk
as it does on my personal computer, so even from Sagemaker it is showing the data is there (I also know the data is there, as when I remote in to the RDS at AWS using mysql workbench I see it directly).
But when I try to fetch, e.g., mouse.fetch('mouse_id')
I am getting an empty array back. Is there some setting that needs to be tweaked for fetch()
to work?
Here is some sample code:
import datajoint as dj
# connect to server
dj.config['database.host'] = 'ip_address_here'
dj.config['database.user'] = 'admin'
dj.config['database.password'] = 'not_my_password'
dj.conn()
# define table/fetch data
from pipeline.tables import Mouse
mouse_table = Mouse()
mouse_table.size_on_disk #16k on both systems
print(len(mouse_table)) # 22 on personal, 0 on AWS
mouse_names = mouse_table.fetch('mouse_id') # full on personal, empty on AWS