Hi Team. When using an SQL data source, I not...

Hi Team. When using an SQL data source, I noticed that we have the option to point directly to a table or to a view. My data source is a MySQL table with potentially millions of rows. Most of these rows are irrelevant for any given user, so to limit sync volume I am thinking I could set up user specific views on my single data source. e.g: - User Mary would connect to view โ€œMaryโ€ from the data source - User John would connect to view โ€œJohnโ€ from the same data source

Then at sync time, Appsheet would only pull rows that are relevant to that user. This would have very low impact on the MySQL servers and would void the need to maintain partitioned data tables.

I am not seeing a way to do this in appsheet. Is there one? Otherwise this could be a useful feature.

0 5 588
5 REPLIES 5

Documentation saysโ€ฆ โ€œOnce a MySQL data source has been added to your account, you can add MySQL tables or views to any app. When you choose โ€œAdd Tableโ€ in your app, you can select the specific data source, and a table or view from that data source.โ€

Harry2
New Member

@Christian_Farley2 Hi Christian, to clarify @Aleksi_Alkioโ€™s answer, MySQL tables and views both show up in AppSheet as tables. You can use any table or view in your MySQL database as a table in your AppSheet app. However, it is not possible to dynamically change the underlying MySQL view of an AppSheet table. For instance, it is not possible to change the underlying view of

a table based on who the user is.

If you want to filter data based on userโ€™s identity, you can try using security filters instead. For SQL data sources, AppSheet will translate security filters into SQL queries that are sent to the database. Since the filters are included in the queries, the amount of data retrieved from the database will be reduced to improve performance.

@Harry This sound exactly like what I need.

Can the filter only be set using the userโ€™s email? or can we send another value, like a project ID for instance?

If I expand on my previous example: Mary = ProjectA John = ProjectA Bob = Project B

Id like both Mary and John retrieve the same data, as they share the same project.

Harry2
New Member

@Christian_Farley2 Hi Christian, you can use any value in the security filters, including project IDs to filter data coming from the database.

Thanks!

Top Labels in this Space