Hi team,
I have been doing the auto-assignment of tables and DBconnection for the datamodel from python. But i am getting a problem in which the store type for a table is appearing as unavialable. This happens only some times when the datamodel is copied from some other server. But this completely removes the object of doing this in the first place.
below is the screenshot.
Any help would be appriciated.
image722226 35.9 KB
Edit:
It should be as below
image701141 39.7 KB
Page 1 / 1
Hi @rahulbhatt,
as I can see, this question was answered by our servicedesk.
I will copy the response here in case someone else faces the issue:
DataStore: Unavailable means that the data for this table is cached data. As the customer described correctly, this happens when the table was imported via transport; the transport doesnt know anything about the original DB connection, it just contains the data itself as files.
To set a DB connection for such a table, you can use
Then it should change the data store of the table accordingly.
So you just need a DBConnection object which should be set. If there are already connections defined in the datamodel, you can get all DBConnections for a DataModel with:
Alternatively, if no DBConnection is contained in the datamodel, a new one can be created with DBConnection.create_new() or you can create it via the frontend first.
as I can see, this question was answered by our servicedesk.
I will copy the response here in case someone else faces the issue:
DataStore: Unavailable means that the data for this table is cached data. As the customer described correctly, this happens when the table was imported via transport; the transport doesnt know anything about the original DB connection, it just contains the data itself as files.
To set a DB connection for such a table, you can use
table.set_db_connection(<DBConnection>, <table name in the database>)
Then it should change the data store of the table accordingly.
So you just need a DBConnection object which should be set. If there are already connections defined in the datamodel, you can get all DBConnections for a DataModel with:
connections = datamodel.connections
Alternatively, if no DBConnection is contained in the datamodel, a new one can be created with DBConnection.create_new() or you can create it via the frontend first.
Hi @nicolas.i
Surely id hope this would be useful to someone.
Thank you .
Surely id hope this would be useful to someone.
Thank you .
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.