{"id":1965,"date":"2011-02-23T09:47:39","date_gmt":"2011-02-23T14:47:39","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1965"},"modified":"2011-02-23T09:47:39","modified_gmt":"2011-02-23T14:47:39","slug":"goldengate-macro","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1965","title":{"rendered":"GoldenGate Macro"},"content":{"rendered":"<p>* Valid for<br \/>\n&#8211; Extract<br \/>\n&#8211; Replicat<br \/>\n* Syntax<\/p>\n<pre lang=\"bash\">\r\nMACRO <macrochar><macro name>  # macrochar defaults to pound sign '#'\r\nPARAMS (<macrochar><paramname> [, ...])  # Parameters passed to macro\r\nBEGIN\r\n<macro body>\r\nEND;\r\n<\/pre>\n<p>* Example<\/p>\n<pre lang=\"bash\">\r\nMACRO #make_date\r\nPARAMS (#year, #month, #day)\r\nBEGIN\r\n@DATE(\"YYYY-MM-DD\", \"CC\", @IF(#year < 50, 20, 19),\r\n\"YY\", #year, \"MM\", #month, \"DD\", #day)\r\nEND;\r\n\r\n-- Calls make_date macro from macro\r\nMACRO #assign_date\r\nPARAMS (#target_col, #year, #month, #day)\r\nBEGIN\r\n#target_col = #make_date (#year, #month, #day)\r\nEND;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>* Valid for &#8211; Extract &#8211; Replicat * Syntax MACRO # macrochar defaults to pound sign &#8216;#&#8217; PARAMS ( [, &#8230;]) # Parameters passed to macro BEGIN END; * Example MACRO #make_date PARAMS (#year, #month, #day) BEGIN @DATE(&#8220;YYYY-MM-DD&#8221;, &#8220;CC&#8221;, @IF(#year &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1965\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[88],"tags":[],"class_list":["post-1965","post","type-post","status-publish","format-standard","hentry","category-goldengate"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-vH","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1965"}],"version-history":[{"count":1,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1965\/revisions"}],"predecessor-version":[{"id":1966,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1965\/revisions\/1966"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}