Hello,
Could anyone guide me how to create record type from View table?
Thanks
Discussion posts and replies are publicly visible
Just choose database as the source but don't enable data sync.
docs.appian.com/.../configure-record-data-source.html
Hello manjit.1486 While creating record type select source type as DatabaseMake sure to select disabled sync and related feature.Select view from respective data store.https://docs.appian.com/suite/help/24.1/Create_a_Record_Type.html
hi manjit.1486 go to appian designer, create a new record type, once record is created you will find the below UI : then click on tell us about your data
Then click on database:
After that, select disable data sync option and click on next,: If you enable and move forward you will be unable to find your view, view will not be found seen when data sync is enabled
The you can browse or search your view name and finish creating the record type:
1. As far I understand , if we create with disable sync feature , it may not be of that useful and performance efficient as indirectly it queries the data from table/view, as nothing is cached.
2. As view is in memory that's the reason they might have disabled the sync feature for this.
3. I would suggest better to create view using record types with sync enabled, instead of querying the view using record. Again up to your use case, just check which is better suits you.
4. Try checking the performance of all the three, querying the record type built on view with disable sync, querying the view using query entity, build view using record types with enable sync.
Just curious to hear the feedback of #4 for your use case.
I suggest to go with 'build view using record types with enable sync'. This will give you best performance among all the options as database view cannot have index and a query has to run on all the rows of database view. Avoid using database view.
Harsh Kumar Agarwal said:database view cannot have index
Not sure whether I would go with that, but in general, avoiding database views is a good thing.
Stefan Helzle As database views are virtual entity so you cannot add indexes to those. While we make a call from Appian to view using some filter then it reads all the rows of view regardless if that column is indexed in the original table or not.https://dev.mysql.com/doc/refman/8.3/en/view-restrictions.html
Sure, but depends on what exactly you mean with "index". A table index to support the aggregation in the view, or a unique key constraint in the resulting dataset. That's what I meant and which is just a minor detail in the "views are evil" discussion.
For what it's worth I think it's a "horses for courses" debate. There's nothing inherently evil about Views (we got along with them fine for decades!). The performance red flag might be a false flag - a View doesn't necessarily equate to "poor performance" (a badly written View and/or Views that use tables that are poorly indexed might perform badly of course - but they might not!).
Another way of looking at this is that the whole purpose of Record Relationships in Appian is to emulate "joining tables in a database" and what are Views if not two or more tables joined together so that normalized data is brought together in one convenient place for use?
So (in short) you could do the following;
Hi. I already did this but view is not coming up in search or browse option. That's why I am curious- how to create record from view table. I just disabled sync and related feature and it works. Thanks for getting back to me