Troubleshooting error message Invalid Object Name accessing MS SQL with python
Every table belongs to a schema
you yourself used an example - [Data].[Version]
Data is the Schema and Version is the Object name
So you need to find out which schema MyTable belongs to and supply it in your query.
[Data].[MyTable] for example.
(The Object browser in Management Studio is your friend)
Good to know. Every User has a Default Schema and the default default schema is dbo
Therefore if the Table belongs to the dbo schema and the user has the default default schema it is a shorthand to write MyTable.

The master database is a system database so looks like that might be where your problem is. You could try 3 part naming
dbname.schemaname.tablename
or try running a query &quot;use dbname&quot; which should change your context to the right db
But dig into why you are connecting to master instead of the database you specify in the connection string (might be a type, lack of permissions or many other things)