{"id":39,"date":"2013-04-23T14:20:00","date_gmt":"2013-04-23T12:20:00","guid":{"rendered":""},"modified":"2017-11-13T18:33:53","modified_gmt":"2017-11-13T17:33:53","slug":"sample-code-using-datapump-api-for-metadata-and-data-filtering","status":"publish","type":"post","link":"https:\/\/ilmarkerm.eu\/blog\/2013\/04\/sample-code-using-datapump-api-for-metadata-and-data-filtering\/","title":{"rendered":"Sample code: Using Datapump API for metadata and data filtering"},"content":{"rendered":"<p>I was looking for PL\/SQL examples to use metadata and data filtering in datapump API, but I didn&#8217;t find any. So here is one example. It uses table reload_dev_tables to specify what schemas\/tables should be exported using data pump and what where clause should be set.<\/p>\n<p>Structure for reload_dev_tables:<\/p>\n<pre><code> Name                                      Null?    Type                        \n ----------------------------------------- -------- -------------\n OWNER                                     NOT NULL VARCHAR2(40)                \n TABLE_NAME                                NOT NULL VARCHAR2(40)                \n IS_FULL                                   NOT NULL NUMBER(1)                   \n FILTER_PREDICATE                                   VARCHAR2(250)   \n<\/code><\/pre>\n<p>Here is the datapump code itself, tested in 11.2.0.3. This is just a demonstration how to use the datapump API, specifically the metadata and data filters.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/ilmarkerm\/3a27ddf55f840831dbd96df02c899afe.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was looking for PL\/SQL examples to use metadata and data filtering in datapump API, but I didn&#8217;t find any. So here is one example. It uses table reload_dev_tables to specify what schemas\/tables should be exported using data pump and what where clause should be set. Structure for reload_dev_tables: Name Null? Type &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[4,13],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-blog-entry","tag-oracle","tag-plsql"],"_links":{"self":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":3,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":402,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/39\/revisions\/402"}],"wp:attachment":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}