Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Use output of one SQL query in one dataset in another SQL query in another dataset based on user inp
sushilkumarsah
<p>I am having one dataset named rep_entityType. In this dataset I have a SQL query which gets data from DB based on previous user inputs. There are 3 output columns of the dataset as shown in image below.</p>
<p> </p>
<p>
Find more posts tagged with
Comments
Clement Wong
<p>Have you tried In rep_aggregationtag Data Set to set the Query as:</p>
<pre class="_prettyXprint">
select name from spm_attribute_set sas, spm_tupplefields tf
where sas.field_id = tf.id and sas.set_id =?</pre>
<p>And then create a Parameter in the aggregationtag Data Set and point it to the entityType? (You might need to reset the parameter group's entityType settings after you do this.)</p>
<p> </p>
<p> </p>
<p>Based on the limited information you provided, I took a stab at recreating your tables using the Classic Models database. The attached demonstrates your requirement.</p>
<p> </p>
<p>If you choose 1002, then 1056, we'll see an ENTITYTYPE of 1 (Classic Model's it is OfficeCode).</p>
<p> </p>
<p>In the last table of the sample, your "rep_aggregationtag" is displayed according to the ENTITYTYPE selection. With the 1002, the 1056 values, you should see a list of 6 last names.</p>
<p> </p>
<p>If you require further assistance, please use the attached sample design as a base.</p>
sushilkumarsah
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">Thanks for replying <span style="color:rgb(0,0,0);"><strong>Clement Wong. </strong></span>I had tried that ? and setting parameter tag, but I was not able to understand how to point to enityType.</span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">Second thing you have told to do some modification in enityType parameter group, what modification you are expecting I didn't understood that.</span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">My <strong>rep_entityType</strong> dataset returns 3 output coulmns : <strong>Network hierarchy</strong>(Short Name, shown to user in drop down for input selection), <strong>EntityType</strong>(Full name, mapped to short name and actually used in code when user selects any short name), <strong>id</strong>.</span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">I have already set the parameter <strong>entityType</strong> is such a way that when user selects any shortname(<span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"><strong>Network hierarchy)</strong></span></span>, I get the corresponding full name(<span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"><strong>EntityType)</strong></span></span> in my script code. But here to use in another query in another dataset(<strong>rep_aggregationtag</strong>) I want the "id" which is the third output column in <strong>rep_entityType</strong> dataset.</span></span></p>
sushilkumarsah
<p>The question is still open and I have not got any solution yet. Looking for any possible information.</p>
Clement Wong
<p><em><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">Thanks for replying <span style="color:rgb(0,0,0);"><strong>Clement Wong. </strong></span>I had tried that ? and setting parameter tag, but I was not able to understand how to point to enityType.</span></span></em></p>
<p> </p>
<p>Like this @ <a data-ipb='nomediaparse' href='
http://help.eclipse.org/mars/index.jsp?topic=/org.eclipse.birt.doc/birt/rp-HowToDefineADataSetParameter.html'>http://help.eclipse.org/mars/index.jsp?topic=/org.eclipse.birt.doc/birt/rp-HowToDefineADataSetParameter.html</a></p>
;
<p> </p>
<p><em><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">Second thing you have told to do some modification in enityType parameter group, what modification you are expecting I didn't understood that.</span></span></em></p>
<p> </p>
<p>You will see that after you add a Parameter in the Data set and bind it to an existing parameter that is in a group, the definition of that parameter (pointing it to a dynamic data set) is lost and you'll just need redefine it. Simple step.</p>
<p> </p>
<p>Again, if you require further assistance, please use my sample as a base, and modify the queries to be like your requirements.</p>