<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Querying the Data from Views</title><link>https://community.appian.com/discussions/f/new-to-appian/18871/querying-the-data-from-views</link><description>Hi Guys, 
 
 I gonna write a &amp;quot;Join&amp;quot; query &amp;amp; create a &amp;quot;View&amp;quot; on it. Now, I want to query the data from MySQL&amp;#39;s &amp;quot;Views&amp;quot; &amp;amp; use it in my Appian application. Thanks in advance.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84336?ContentTypeID=1</link><pubDate>Wed, 04 Aug 2021 20:09:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9b8bdc83-3f31-483d-ba15-f51a42286f74</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Some&amp;nbsp;additional context: Appian requires you to define a field as a PK in order to map it to a data store entity. It&amp;#39;s also required for several other parts of Appian (e.g. as the source of a recordv type). However, a DB View doesn&amp;#39;t have a concept of a PK field, so you often will need to construct a field in your DB view that is unique to act as the PK in Appian.&lt;/p&gt;
&lt;p&gt;The error that you&amp;#39;re seeing about &amp;quot;a_id&amp;quot; is Appian&amp;#39;s attempt to automatically add a PK field for you. If you have a table, Appian on publish of the data store Appian can actually alter the table to add this as a PK. However, a database view wouldn&amp;#39;t allow this (since it isn&amp;#39;t a table), so that&amp;#39;s why you&amp;#39;re seeing this error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84308?ContentTypeID=1</link><pubDate>Wed, 04 Aug 2021 04:57:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:398426e5-9346-49d5-b763-f30e6a58647c</guid><dc:creator>santhoshk0003</dc:creator><description>&lt;p&gt;Thank you salim, I got it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84285?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 13:04:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1180c6d9-3d02-4548-9c40-e49dce1f7d62</guid><dc:creator>salim.galfane</dc:creator><description>&lt;p&gt;this means in the cdt, you did not mention which column is primary key. update the corresponding cdt and mark column id as primary key. You should then be able to publish the datastore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84278?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 11:33:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9bcded1-0eb6-496b-abda-df62472c75a4</guid><dc:creator>santhoshk0003</dc:creator><description>&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;Thanks for replying salim in more info its showing&amp;nbsp;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&lt;span&gt;The data source schema does not match the type mappings: Missing column: a_id in Appian.losviewpractice (APNX-2-4056-000)&lt;/span&gt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&lt;span&gt;my column is named &amp;quot; id &amp;quot; actually not &amp;quot;a_id&amp;quot;&amp;nbsp; like it shows in error message, thought you should know&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84277?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 11:31:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dbc50c99-5d0c-4207-83aa-942a1df243b8</guid><dc:creator>salim.galfane</dc:creator><description>&lt;p&gt;You need to open the draft datastore and try to validate it. It will probably see an error, click on the more option to see details of the error, and write it back here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84276?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 11:16:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cbe6ad91-668a-470d-bf6d-456a09580e57</guid><dc:creator>santhoshk0003</dc:creator><description>&lt;p&gt;yes stefan, I have created a view from two of my tables and then i tried to create a CDT from view, but even after selecting the check box that lets you to crate an Entity for the Data Type, Its not able to create an Entity. and is showing an Error that states&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;div class="FieldLayout---field_layout"&gt;
&lt;div class="FieldLayout---input_below"&gt;
&lt;div class=""&gt;
&lt;h4 class="HeaderText---richtext_header HeaderText---center"&gt;Data Store Not Published&lt;/h4&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="FieldLayout---field_layout"&gt;
&lt;div class="FieldLayout---accessibilityhidden"&gt;&lt;span class="FieldLayout---field_label" id="95e7da5078c7a703275bd798c7590410"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="FieldLayout---input_below"&gt;
&lt;div class=""&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;Data type created successfully. The entity was added to the selected data store, but one or more of the data entities does not map to the table structure in the selected data source. The data store has been saved as a draft.&lt;a class="LinkedItem---richtext_link elements---global_a" href="https://owtj.appian.community/suite/dataStore.do?id=2763&amp;amp;version=-1&amp;amp;appian_environment=designer"&gt; View Data Store&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p class="ParagraphText---richtext_paragraph ParagraphText---default_direction ParagraphText---center elements---global_p"&gt;i am unable to get it right please help me&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84231?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 09:01:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dcf57751-0b5c-4867-a700-1095cf0a51c1</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;More details please. What went wrong? Any error messages? Did you try to add the entity manually to the DS?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/84230?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 08:42:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1a40841e-da0f-412d-a846-b8de6db82cab</guid><dc:creator>santhoshk0003</dc:creator><description>&lt;p&gt;while i am creating CDT from a view the CDT&amp;nbsp; is being created all good but the mapping to data store is not happening and i can&amp;#39;t seem to find why? can you please help me??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/74187?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 20:13:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f8e74112-573a-4dae-8743-31cc5ba1b292</guid><dc:creator>Ponnuchamy Arumugasamy</dc:creator><description>&lt;p&gt;Thanks for your information. I will do it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/74186?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 20:10:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d345b5ab-9a2a-47ce-af53-580679ea280a</guid><dc:creator>Ponnuchamy Arumugasamy</dc:creator><description>&lt;p&gt;Sure. I will do. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/74185?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 19:06:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:77bbf450-35f8-448a-956e-1ae6efc11f2d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Similar to how you query from a regular table, Views are also queried by &lt;a href="https://docs.appian.com/suite/help/20.1/Mapping_CDTs_to_Pre-defined_Database_Tables.html"&gt;creating a CDT and Data Store Entity&lt;/a&gt; mapping to the view.&amp;nbsp; The one word of caution I would give you is to make sure you construct your View such that your primary key column is actually unique.&amp;nbsp; If it&amp;#39;s not a unique value, funny things will happen when you query on the view, relating to the count of items it contains.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/74184?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 17:32:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4b8816bf-9690-4334-b061-026b88a7b9cc</guid><dc:creator>sujithap951</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can Create CDT for the view similar to how you create for a table and map it to the data store. Then you can query using a!queryEntity(). Querying is pretty much same how you can do with tables except write operations.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/74182?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 16:22:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aeb8bd3b-9b08-4b9b-9bc9-9a32274fb631</guid><dc:creator>Ponnuchamy Arumugasamy</dc:creator><description>&lt;p&gt;Yeah. Thanks for your response.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please refer to the structure of the tables that I gonna use to create a View using Join operation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Student &lt;strong&gt;Table&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1589818591114v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Pass_Request_Details &lt;strong&gt;Table&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1589818646004v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;Pass_Data &lt;strong&gt;View&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1589818757986v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My question is how to query this data (&lt;em&gt;&lt;strong&gt;from above mentioned View&lt;/strong&gt;&lt;/em&gt;) and use it in our appian application like in Interface, Reports etc. Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Querying the Data from Views</title><link>https://community.appian.com/thread/74177?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 12:36:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84cea22e-47f5-4467-865d-389cd7ee6e72</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;That sounds fine - do you have any particular question?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>