forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
43 lines
11 KiB
HTML
43 lines
11 KiB
HTML
<a name="EN-US_TOPIC_0000001188642118"></a><a name="EN-US_TOPIC_0000001188642118"></a>
|
|
|
|
<h1 class="topictitle1">Planning Data Export</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_section7173137164732"><h4 class="sectiontitle">Scenarios</h4><p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_p10489206164747">Plan the storage location of exported data in OBS.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_s7274251cd6eb4d56b3f4109d7f766f3a"><h4 class="sectiontitle">Planning OBS Save Path and File</h4><p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_a84ef7a49720745b98b0a1b2ee37a05f4">You need to specify the OBS path (to directory) for storing data that you want to export. The exported data can be saved to a file in CSV format. The system also supports TEXT so that you can import the exported data to various applications.</p>
|
|
<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_a27bb90e2ff04470dbbe6ca4b892a233f">The target directory cannot contain any files.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_sf97b7c90ffd5487889d0b443e7d9e9d5"><h4 class="sectiontitle">Planning OBS Bucket Permissions</h4><p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_a11ac5ff4323a40f78ad9445d2645f271">The user used to export data must:</p>
|
|
<ul id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_ue93c6bc04be34588a8f7a96d0d859506"><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_lf39792b0f3b249469b196fd9e7eecede">Have OBS enabled.</li><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_l23b008876f514554911b6f4187d6a310">Have the write permission on the OBS bucket where the data export path is located.<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_adeeb08fbc2d94a8fbdc2a92bc127202f"><a name="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_l23b008876f514554911b6f4187d6a310"></a><a name="en-us_topic_0000001098811002_en-us_topic_0117407697_l23b008876f514554911b6f4187d6a310"></a>You can configure ACL permissions for the OBS bucket to grant the write permission to a specific user.</p>
|
|
<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_abf9b16f203824cbcb4da85c79eec6314">For details, see <a href="#EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_s7fcbf9744bc440899b56c22be4fae4f3">Granting Write Permission to OBS Storage Location and OBS Bucket as Planned</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_s27d9113ee2404b9a9569615df5b18e54"><h4 class="sectiontitle">Planning Data to Be Exported and Foreign Tables</h4><p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_a28472b49e2404118a1f3f45bc9deae26">You must prepare data to be exported in the database table, and the data volume per row must be less than 1 GB. Based on the data to be exported, plan foreign tables whose attributes such as columns, column types, and length match those of user data.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_s7fcbf9744bc440899b56c22be4fae4f3"><a name="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_s7fcbf9744bc440899b56c22be4fae4f3"></a><a name="en-us_topic_0000001098811002_en-us_topic_0117407697_s7fcbf9744bc440899b56c22be4fae4f3"></a><h4 class="sectiontitle">Granting Write Permission to OBS Storage Location and OBS Bucket as Planned</h4><ol id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_ofafc5dcd531e44de8b88f816fd202b84"><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_l551f73e447804ce9b496d4c21f886e01"><span>Create an OBS bucket and a folder in the OBS bucket as the directory for storing exported data.</span><p><ol type="a" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_ol234014417227"><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_li1833911452216">Log in to the OBS management console.<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_p1033911410229"><a name="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_li1833911452216"></a><a name="en-us_topic_0000001098811002_li1833911452216"></a>Click <span class="uicontrol" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_uicontrol2134910881164157"><b>Service List</b></span> and choose <span class="uicontrol" id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_uicontrol274821817164214"><b>Object Storage Service</b></span> to open the OBS management console.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_l3a36b8da7bb948e8ba80039e74320cef">Create a bucket.<p id="EN-US_TOPIC_0000001188642118__p13691813101413"><a name="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_l3a36b8da7bb948e8ba80039e74320cef"></a><a name="en-us_topic_0000001082926859_en-us_topic_0117407656_l3a36b8da7bb948e8ba80039e74320cef"></a><span id="EN-US_TOPIC_0000001188642118__ph16101249172911">For details about how to create an OBS bucket, see "OBS Console Operation Guide > Managing Buckets > Creating a Bucket" in the <em id="EN-US_TOPIC_0000001188642118__i6609174912296">Object Storage Service User Guide</em>.</span></p>
|
|
<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_a72fe63ccbac94a8f97feda51458a2f79">For example, create two buckets named <strong id="EN-US_TOPIC_0000001188642118__b169767256483955">mybucket</strong> and <strong id="EN-US_TOPIC_0000001188642118__b211306333483955">mybucket02</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_l13b4b7608ad64ed1a79a4368da45bbeb">Create a folder.<p id="EN-US_TOPIC_0000001188642118__p1342119104189"><a name="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_l13b4b7608ad64ed1a79a4368da45bbeb"></a><a name="en-us_topic_0000001082926859_en-us_topic_0117407656_l13b4b7608ad64ed1a79a4368da45bbeb"></a><span id="EN-US_TOPIC_0000001188642118__ph1931123193017">For details about how to create an OBS bucket, see "OBS Console Operation Guide > Managing Objects > Creating a Folder" in the <em id="EN-US_TOPIC_0000001188642118__i183117319306">Object Storage Service User Guide</em>.</span></p>
|
|
<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_a7abb9511601b4be7b3fc1ecbda11bbbc">Example:</p>
|
|
<ul id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_ub89ac3dd3a784059b364f81142944001"><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_lb7292b7b74d6477a826c1c58c0575c0a">Create a folder named <strong id="EN-US_TOPIC_0000001188642118__b197975143483955">output_data</strong> in the <strong id="EN-US_TOPIC_0000001188642118__b29908841183955">mybucket</strong> OBS bucket.</li><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001082926859_en-us_topic_0117407656_l5bd9fb357ac7429b9d2e19329381294d">Create a folder named <strong id="EN-US_TOPIC_0000001188642118__b59262030383955">output_data</strong> in the <strong id="EN-US_TOPIC_0000001188642118__b101135783283955">mybucket02</strong> OBS bucket.</li></ul>
|
|
</li></ol>
|
|
</p></li><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_l4488c41f289d48dc953faf530d118381"><span>Determine the path of the created OBS folder.</span><p><p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_a2629788392eb4de2936089a596c27db9">Specify the OBS path for storing exported data files. This path is the value of the <strong id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_b69411290317">location</strong> parameter used for creating a foreign table.</p>
|
|
<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_p16290144214342">The OBS folder path in the <strong id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_b383311136599">location</strong> parameter consists of <strong id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_b3834513105917">obs://</strong>, a bucket name, and a file path. Example:</p>
|
|
<p id="EN-US_TOPIC_0000001188642118__p17252417193615">In this example, the OBS folder path is as follows:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001188642118__screen1425331714369"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">obs</span><span class="p">:</span><span class="o">//</span><span class="n">mybucket</span><span class="o">/</span><span class="n">output_data</span><span class="o">/</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<div class="note" id="EN-US_TOPIC_0000001188642118__note134221657133512"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188642118__p1042275793514">The OBS directory to be used for storing data files must be empty.</p>
|
|
</div></div>
|
|
</p></li><li id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_l529009df7a68489cb1978fcaf9ab90eb"><span>Grant the OBS bucket write permission to the user who wants to export data.</span><p><p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_en-us_topic_0117407697_a029311ec475a44348c33183bedb837ad">When exporting data, a user must have the write permission on the OBS bucket where the data export path is located. You can configure ACL permissions for the OBS bucket to grant the write permission to a specific user.</p>
|
|
<p id="EN-US_TOPIC_0000001188642118__en-us_topic_0000001098811002_p1988194910282"><span id="EN-US_TOPIC_0000001188642118__ph152311434177">For details, see "OBS Console Operation Guide > Permission Control > Configuring a Bucket ACL" in the <em id="EN-US_TOPIC_0000001188642118__i1084695511508">Object Storage Service User Guide</em>.</span></p>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0157.html">Exporting CSV/TXT Data to OBS</a></div>
|
|
</div>
|
|
</div>
|
|
|