Hi Guys, I will be deploy an app, ee want t...

Hi Guys,

I will be deploy an app, ee want to distribute this app to our customers.

Our customer have their data in a MySql database.

What is the best way to distribute the APP, considering how each customer needs to refer to their database?

Thanks

0 16 739
16 REPLIES 16

@Marco_Silvio_Jaggi can you say how the app data sources are now configured? I am not sure it is possible to set up the app so that it dynamically hooks up to a specific MySQL database source for each customer. From what I understand, you can set up โ€œviewsโ€ for each customerโ€™s own records within a single MySQL database. @RezaRaoofi may be able to clarify.

@Bellave_Jayaram

Thanks Bellave, The databases have the same structure and we control the access.

My question is about the better mode to distribute the APP.

E.g. I can copy the APP and create a link with the โ€œnewโ€ database? I have to copy the APP for each costumer?

Thanks for your answer

Yes, I realize that it is not clear.

Iโ€™m sorry.

When we delivery our APP to our clients, the APP has to refer to clientโ€™s google sheets and tables mysql.

First time. How can I link the APP to the clientโ€™s data?

After first time, when we deploy a new APP release, how we can distribute the new APP release without restore all the data links?

Yes, if you are using a separate set of tables for each client regardless of using spreadsheets or MySQL databases, then in each new app release you will have to go to app design and manually change the data source in each table from the development appโ€™s database/spreadsheet name to clientโ€™s live database/spreadsheet name.

There are 2 alternatives though:

  1. Keep all clientsโ€™ data in one database, and consider a column in each table named Client ID, then in your app use Security Filters for all tables and filter only clientsโ€™ own data; this way you can save some time on future releaseโ€™s work at the cost of worse database design/privacy by keeping everybodyโ€™s data in one large database.

  2. You can take advantage of data partitioning which is one of AppSheetโ€™s new features and it is still in Beta; data partitioning will allow your app to connect to different data sources for the same table in your app, based on a specific variable that you define (e.g. Client ID); however this feature is only available for Corporate plans; check out the article below for more details: https://intercom.help/appsheet/performance-scale-reliability/scaling-to-large-data-sets/scaling-usin...

@RezaRaoofi

Dear Reza,

Thank you for your suggestion, we have forwarded the application for a Corporate Plans.

However, we hope this is the solution to create and maintain APP that can refer to different databases, one for each customer. Please reassure me about this.

The first solution proposed by you: โ€œKeep all clientsโ€™ data in one databaseโ€, is not exploitable even for legal reasons.

Anyway, how can I โ€œchange the data source in each tableโ€? I didnโ€™t found where is this capability.

@Marco_Silvio_Jaggi It is in the same link I sent you about data partitioning; it is the very last paragraph with this title: Data partitioning: multiple spreadsheets, but instead of using multiple spreadsheets option, you can use multiple databases, because each MySQL database is added as a new data source to your AppSheet account just like the way you can add a new spreadsheet, so when you build a new database for new client, you just need to adjust the definition of the table to be able to connect to the identical table in a different data source based on the variable you define for Client ID.

Just play around with the data partitioning option inside your tableโ€™s properties, and you will get a hang of it.

@RezaRaoofi

Thanks Reza,

the โ€œpartitionโ€ configuration does. Now I start with test, I keep you in touch.

Could you help me about this error message:

Table โ€˜appUsersโ€™ has an invalid partition definition โ€˜SWITCH(LOOKUP(USEREMAIL(), โ€œshtAccessAdmโ€, โ€œUserEmailโ€, โ€œClientโ€), โ€œGeorgiaโ€, โ€œTable=appUsers_in_jem_crm_data_mktgeorgia__appUsersโ€, โ€œTable=appUsers_in_jem_crm_data_mktgeorgia__appUsersโ€)โ€™. Unable to find table โ€˜shtAccessAdmโ€™, did you mean โ€˜shtAccessAdmโ€™?

Only for a better comprehension: shtAccessAdm is a Google sheet.

I canโ€™t troubleshoot that. I suggest to add a new separate post in community and ask for help with the LOOKUP expression you have entered in data partitioning and the error; someone from AppSheet team might need to look into the app for you.

Yes, currently I do not know a way other than to copy the app for each new database.

@Bellave_Jayaram

Ok - That means I have to copy always the new release for each database?

Yes, once you make a copy, if you need to make a change in the app, you have to do it in all the apps.

@Marco_Silvio_Jaggi If you control the access and you own the MySQL server, I believe the best practice is to copy a separate new database from the same structure template for each customer, and then each new copy of the app would have to be adjusted to connect to the same table names but in a separate database. This would work the best if you are also keeping the apps in your AppSheet account, and you are not transferring apps to customerโ€™s AppSheet account.

In other words, your MySQL instance will be a multi-tenant database server.

@RezaRaoofi

@Bellave_Jayaram

Thanks guys.

Happy new year

@Marco_Silvio_Jaggi youโ€™re welcome, and happy new year!

@RezaRaoofi

Dear Reza,

Thank you for your greetings and answers.

Now, we are very unconfortable if, always we change something in our APP, we have to restore all the link with the tables, it does not matter if those are google sheets or mySql tables.

Is this the only solution to deploy an APP?

@Marco_Silvio_Jaggi You are welcome!

What do you mean by: โ€œwe have to restore all the link with the tablesโ€ ?

Top Labels in this Space