forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
44 lines
15 KiB
HTML
44 lines
15 KiB
HTML
<a name="mrs_01_24012"></a><a name="mrs_01_24012"></a>
|
|
|
|
<h1 class="topictitle1">Using PowerBI to Access HetuEngine</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_24012__en-us_topic_0000001173470764_section1973493093211"><h4 class="sectiontitle">Prerequisites</h4><ul id="mrs_01_24012__en-us_topic_0000001173470764_ul14560222143617"><li id="mrs_01_24012__en-us_topic_0000001173470764_li26441414617">PowerBI has been installed.</li><li id="mrs_01_24012__en-us_topic_0000001173470764_li1513212247362">The JDBC JAR file has been obtained. For details, see <a href="mrs_01_2337.html#mrs_01_2337__en-us_topic_0000001219029577_li1747527125">1</a>.</li><li id="mrs_01_24012__en-us_topic_0000001173470764_li1081090113213">A human-machine user has been created in the cluster. For details about how to create a user, see <a href="mrs_01_1714.html">Creating a HetuEngine User</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_24012__en-us_topic_0000001173470764_section828204195416"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_24012__en-us_topic_0000001173470764_ol162827455416"><li id="mrs_01_24012__en-us_topic_0000001173470764_li15555172583515"><span>Use the default configuration to install <strong id="mrs_01_24012__en-us_topic_0000001173470764_b172071320191319">hetu-odbc-win64.msi</strong>. Download link: <a href="https://openlookeng.io/en/download/" target="_blank" rel="noopener noreferrer">https://openlookeng.io/download.html</a>.</span><p><div class="fignone" id="mrs_01_24012__en-us_topic_0000001173470764_fig1544221152215"><span class="figcap"><b>Figure 1 </b>Downloading the driver</span><br><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image54592112211" src="en-us_image_0000001349259001.png"></span></div>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li1480314103819"><span>Configure data source driver.</span><p><ol type="a" id="mrs_01_24012__en-us_topic_0000001173470764_ol198884463816"><li id="mrs_01_24012__en-us_topic_0000001173470764_li16995191816380">Run the following commands in the local command prompt to stop the ODBC service that is automatically started.<p id="mrs_01_24012__en-us_topic_0000001173470764_p688814473814"><a name="mrs_01_24012__en-us_topic_0000001173470764_li16995191816380"></a><a name="en-us_topic_0000001173470764_li16995191816380"></a><strong id="mrs_01_24012__en-us_topic_0000001173470764_b168888463814">cd C:\Program Files\openLooKeng\openLooKeng ODBC Driver 64-bit\odbc_gateway\mycat\bin</strong></p>
|
|
<p id="mrs_01_24012__en-us_topic_0000001173470764_p14888174203814"><strong id="mrs_01_24012__en-us_topic_0000001173470764_b88473303385">mycat.bat stop</strong></p>
|
|
<p id="mrs_01_24012__en-us_topic_0000001173470764_p7579190135316"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image35787065310" src="en-us_image_0000001295899864.png"></span></p>
|
|
</li><li id="mrs_01_24012__en-us_topic_0000001173470764_li09276353915">Replace the JDBC driver.<p id="mrs_01_24012__en-us_topic_0000001173470764_p1588911416381"><a name="mrs_01_24012__en-us_topic_0000001173470764_li09276353915"></a><a name="en-us_topic_0000001173470764_li09276353915"></a>Copy the JDBC JAR file obtained in <a href="mrs_01_2337.html#mrs_01_2337__en-us_topic_0000001219029577_li1747527125">1</a> to the <strong id="mrs_01_24012__en-us_topic_0000001173470764_b701641123616">C:\Program Files\openLooKeng\openLooKeng ODBC Driver 64-bit\odbc_gateway\mycat\lib</strong> directory and delete the original <strong id="mrs_01_24012__en-us_topic_0000001173470764_b7178458113620">hetu-jdbc-1.0.1.jar</strong> file from the directory.</p>
|
|
</li><li id="mrs_01_24012__en-us_topic_0000001173470764_li16668105618110">Edit the protocol prefix of the ODBC <strong id="mrs_01_24012__en-us_topic_0000001173470764_b6689185623710">server.xml</strong> file.<p id="mrs_01_24012__en-us_topic_0000001173470764_p488917463810">Change the property value of <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1780446184018">server.xml</strong> in the <strong id="mrs_01_24012__en-us_topic_0000001173470764_b161241811184112">C:\Program Files\openLooKeng\openLooKeng ODBC Driver 64-bit\odbc_gateway\mycat\conf</strong> directory from <strong id="mrs_01_24012__en-us_topic_0000001173470764_b319395516389"><property name="jdbcUrlPrefix">jdbc:lk://</property></strong> to</p>
|
|
<p id="mrs_01_24012__en-us_topic_0000001173470764_p188914483811"><strong id="mrs_01_24012__en-us_topic_0000001173470764_b196171823911"><property name="jdbcUrlPrefix">jdbc:presto://</property></strong>.</p>
|
|
</li><li id="mrs_01_24012__en-us_topic_0000001173470764_li13423101229"><a name="mrs_01_24012__en-us_topic_0000001173470764_li13423101229"></a><a name="en-us_topic_0000001173470764_li13423101229"></a>Configure the connection mode of using the user name and password.<div class="p" id="mrs_01_24012__en-us_topic_0000001173470764_p1955012519211"><a name="mrs_01_24012__en-us_topic_0000001173470764_li13423101229"></a><a name="en-us_topic_0000001173470764_li13423101229"></a>Create a <strong id="mrs_01_24012__en-us_topic_0000001173470764_b196792514427">jdbc_param.properties</strong> file in a user-defined path, for example, <strong id="mrs_01_24012__en-us_topic_0000001173470764_b147457206438">C:\hetu</strong>, and add the following content to the file:<pre class="screen" id="mrs_01_24012__en-us_topic_0000001173470764_screen01011334521">user=admintest
|
|
password=admintest@##65331853</pre>
|
|
</div>
|
|
<div class="note" id="mrs_01_24012__en-us_topic_0000001173470764_note1370319493360"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24012__en-us_topic_0000001173470764_p17703154983614"><strong id="mrs_01_24012__en-us_topic_0000001173470764_b1592035174614">user</strong>: indicates the username of the created human-machine user, for example, <strong id="mrs_01_24012__en-us_topic_0000001173470764_b754919547467">admintest</strong>.</p>
|
|
<p id="mrs_01_24012__en-us_topic_0000001173470764_p6559813133720"><strong id="mrs_01_24012__en-us_topic_0000001173470764_b1798117383469">password</strong>: indicates the password of the created human-machine user, for example, <strong id="mrs_01_24012__en-us_topic_0000001173470764_b272319316479">admintest@##65331853</strong>.</p>
|
|
</div></div>
|
|
</li><li id="mrs_01_24012__en-us_topic_0000001173470764_li789319566214">Run the following commands to restart the ODBC service:<p id="mrs_01_24012__en-us_topic_0000001173470764_p1964425324516"><a name="mrs_01_24012__en-us_topic_0000001173470764_li789319566214"></a><a name="en-us_topic_0000001173470764_li789319566214"></a><strong id="mrs_01_24012__en-us_topic_0000001173470764_b1657732184512">cd C:\Program Files\openLooKeng\openLooKeng ODBC Driver 64-bit\odbc_gateway\mycat\bin</strong></p>
|
|
<p id="mrs_01_24012__en-us_topic_0000001173470764_p3889346385"><strong id="mrs_01_24012__en-us_topic_0000001173470764_b165722933">mycat.bat restart</strong></p>
|
|
<div class="note" id="mrs_01_24012__en-us_topic_0000001173470764_note187972810312"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24012__en-us_topic_0000001173470764_p187982817315">The ODBC service must be stopped each time the configuration is modified. After the modification is complete, restart the ODBC service.</p>
|
|
</div></div>
|
|
</li></ol>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li16611401419"><span>On the Windows <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1043792913468">Control Panel</strong>, enter <strong id="mrs_01_24012__en-us_topic_0000001173470764_b559414403463">odbc</strong> to search for the ODBC management program.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p1832761625313"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image33271516105312" src="en-us_image_0000001348739725.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li1968818439416"><span>Choose <strong id="mrs_01_24012__en-us_topic_0000001173470764_b457149184812">Add</strong> > <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1074903220486">openLookeng ODBC 1.1 Driver</strong> > <strong id="mrs_01_24012__en-us_topic_0000001173470764_b4254113594811">Finish</strong>.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p1939082905317"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image7390929185310" src="en-us_image_0000001349139417.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li990816215191"><span>Enter the name and description as shown in the following figure and click <strong id="mrs_01_24012__en-us_topic_0000001173470764_b12935110131914">Next</strong>.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p1170713235199"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image170722316198" src="en-us_image_0000001296059704.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li065513222511"><span>Configure parameters by referring to the following figure. Obtain <strong id="mrs_01_24012__en-us_topic_0000001173470764_b18679175192113"><</strong><strong id="mrs_01_24012__en-us_topic_0000001173470764_b767915142119"><em id="mrs_01_24012__en-us_topic_0000001173470764_i1951173812413">HSBrokerIP1:port1</em></strong><strong id="mrs_01_24012__en-us_topic_0000001173470764_b267911552119">>,<</strong><strong id="mrs_01_24012__en-us_topic_0000001173470764_b8679352216"><em id="mrs_01_24012__en-us_topic_0000001173470764_i12469154614117">HSBrokerIP2:port2</em></strong><strong id="mrs_01_24012__en-us_topic_0000001173470764_b3679458211">>,<</strong><strong id="mrs_01_24012__en-us_topic_0000001173470764_b1767985162118"><em id="mrs_01_24012__en-us_topic_0000001173470764_i56511050164115">HSBrokerIP3:port3</em></strong><strong id="mrs_01_24012__en-us_topic_0000001173470764_b567913515217">>/hive/default?serviceDiscoveryMode=hsbroker</strong> for <strong id="mrs_01_24012__en-us_topic_0000001173470764_b13882184715207">Connect URL</strong> by referring to <a href="mrs_01_24010.html#mrs_01_24010__en-us_topic_0000001173789310_li6197135010379">2</a>. Select the <strong id="mrs_01_24012__en-us_topic_0000001173470764_b36091842112117">jdbc_param.properties</strong> file prepared in <a href="#mrs_01_24012__en-us_topic_0000001173470764_li13423101229">2.d</a> for <strong id="mrs_01_24012__en-us_topic_0000001173470764_b14174102152210">Connect Config</strong>. Set <strong id="mrs_01_24012__en-us_topic_0000001173470764_b16658153332318">User name</strong> to the user name that is used to download the credential.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p948211212543"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image0482112145417" src="en-us_image_0000001295739900.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li9709971767"><span>Click <strong id="mrs_01_24012__en-us_topic_0000001173470764_b16802173717567">Test DSN</strong> to test the connection. If the connection is successful and both <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1333512175719">Catalog</strong> and <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1098404195710">Schema</strong> contain content, the connection is successful. Click <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1921817385572">Next</strong>.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p13290624155417"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image52901424105410" src="en-us_image_0000001296219332.png"></span></p>
|
|
<p id="mrs_01_24012__en-us_topic_0000001173470764_p1470293715413"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image20702837195412" src="en-us_image_0000001295899860.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li18751518108"><span>Click <strong id="mrs_01_24012__en-us_topic_0000001173470764_b12786410202619">Finish</strong>.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p1140208119"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image44010071116" src="en-us_image_0000001349139413.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li1731514255612"><span>To use PowerBI for interconnection, choose <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1491181111597">Get data</strong> > <strong id="mrs_01_24012__en-us_topic_0000001173470764_b2538217165918">All</strong> > <strong id="mrs_01_24012__en-us_topic_0000001173470764_b136961145195920">ODBC</strong> > <strong id="mrs_01_24012__en-us_topic_0000001173470764_b136184715598">Connect</strong>.</span><p><p id="mrs_01_24012__en-us_topic_0000001173470764_p58321557115418"><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image1283245745412" src="en-us_image_0000001295739896.png"></span></p>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li65475191985"><span>Select the data source to be added and click <strong id="mrs_01_24012__en-us_topic_0000001173470764_b158611819271">OK</strong>.</span><p><div class="fignone" id="mrs_01_24012__en-us_topic_0000001173470764_fig1653181610323"><span class="figcap"><b>Figure 2 </b>Adding a data source</span><br><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image113931511125514" src="en-us_image_0000001349259005.png"></span></div>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li13708201011143"><span>(Optional) Enter <strong id="mrs_01_24012__en-us_topic_0000001173470764_b19819523424">User name</strong> and <strong id="mrs_01_24012__en-us_topic_0000001173470764_b21831305432">Password</strong> of the user who downloads the credential, and click <strong id="mrs_01_24012__en-us_topic_0000001173470764_b1938791644319">Connect</strong>.</span><p><div class="fignone" id="mrs_01_24012__en-us_topic_0000001173470764_fig1594913761313"><span class="figcap"><b>Figure 3 </b>Entering the database username and password</span><br><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image14949376138" src="en-us_image_0000001296219336.png"></span></div>
|
|
</p></li><li id="mrs_01_24012__en-us_topic_0000001173470764_li293594732816"><span>After the connection is successful, all table information is displayed, as shown in <a href="#mrs_01_24012__en-us_topic_0000001173470764_fig5250802327">Figure 4</a>.</span><p><div class="fignone" id="mrs_01_24012__en-us_topic_0000001173470764_fig5250802327"><a name="mrs_01_24012__en-us_topic_0000001173470764_fig5250802327"></a><a name="en-us_topic_0000001173470764_fig5250802327"></a><span class="figcap"><b>Figure 4 </b>Successful connection</span><br><span><img id="mrs_01_24012__en-us_topic_0000001173470764_image112521801321" src="en-us_image_0000001349059549.png"></span></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_2336.html">Using a Third-Party Visualization Tool to Access HetuEngine</a></div>
|
|
</div>
|
|
</div>
|
|
|