Home
Analytics
Retrieving table/column descriptions
Katieee
<p>In sql I can view the tables - the tables columns have a description.<br><br>
Now when I use eclipse/birt to access data I can get all the data barring the descriptions as they're not columns, I believe they're in a massive file relating to the tables. <br><br>
Does anyone have an idea as to if this is possible to even access or has anyone tried to do something similar before?<br><br>
Table example:<br><br>
Data 1 | Data 2 | Data 3<br><br>
d1 | d2 | d3<br><br>
desc : This is table 1</p>
Find more posts tagged with
Comments
JFreeman
<p>What database are you using?</p>
<p>How do you want to use the descriptions within the report design?</p>
<p>Can you post an example of the query you use to obtain the descriptions?</p>
Katieee
<p>Hi Jesse,<br><br>
I'm using a db2 type of database, I would like to have the descriptions used instead of the column names so external users can understand what the columns do<br><br>
- for example FFAPPID could mean something like 'factory floor applicant ID' but they may not know this so I would prefer to use the descriptions from the columns as the headers instead.<br><br>
I don't have a query purely down to the fact that I'm not entirely sure how I would access these descriptions if they don't show up in birt when doing my sql statement yet they show up when I view the database. I was just curious as to if anyone else has ever come across this issue and whether or not they figured out a way of doing it if the descriptions don't have a column. <br><br>
I hope I haven't confused anyone too much.</p>
<p> </p>
<p>*edit I believe this sounds similar to what I am asking but its quite an old post <br>
<a data-ipb='nomediaparse' href='
https://jazz.net/forum/questions/79315/project-description-in-birt-report'>https://jazz.net/forum/questions/79315/project-description-in-birt-report</a><br><br>
;
Regards,<br>
Kate</p>
JFreeman
<p>Well one option would be to set a display name for the columns when creating the query in BIRT.</p>
<p> </p>
<p>For example:</p>
<pre class="_prettyXprint _lang-sql">
SELECT table.FFAPPID as 'Factory Floor Applicant ID'
FROM table
</pre>
<p>You may be able to construct the query so that the display name is dynamically obtained from description instead of hard coded like in my example. </p>
Katieee
<p>Thank you for your quick reply!</p>
<p> </p>
<p>Hopefully I will be able to set it dynamically but your example was a good idea too, I was just changing them in the output columns originally so you have provided an easier solution to that too.<br><br>
Thank you for that, it may give me a good starting point if I can figure out how to access the descriptions
<br><br>
Regards,<br>
Kate</p>
JFreeman
<p>You're welcome.</p>
<p>I'm glad I could be of assistance.</p>
<p> </p>
<p>Let us know if you have any additional questions.</p>