{"id":5615,"date":"2024-11-20T09:09:36","date_gmt":"2024-11-20T00:09:36","guid":{"rendered":"https:\/\/dandelions.co.jp\/blog\/?p=5615"},"modified":"2024-11-20T09:09:36","modified_gmt":"2024-11-20T00:09:36","slug":"engineering-blog-migrating-outsystems-database-to-an-external-db","status":"publish","type":"post","link":"http:\/\/dandelions.co.jp\/blog\/blog\/2024\/11\/20\/engineering-blog-migrating-outsystems-database-to-an-external-db\/","title":{"rendered":"Engineering Blog: Migrating Outsystems Database to an External DB"},"content":{"rendered":"\n<p>Welcome to our engineering blog, where we share the learning experiences we&#8217;re engaged in daily. This time, we&#8217;re focusing on low-code development in Unit 2.<\/p>\n\n\n\n<h2><strong>Today&#8217;s Theme: Migrating Outsystems Database to an External DB<\/strong><\/h2>\n\n\n\n<p>In Outsystems, you can request a free cloud version called the Personal Environment (PE) by creating an account. (<a href=\"https:\/\/success.outsystems.com\/support\/licensing\/what_is_an_outsystems_personal_environment\/\">What is an OutSystems Personal Environment &#8211; OutSystems Support<\/a>)<br>Using this environment, you can develop personal applications for small-scale users and are provided with 2GB of database storage.<\/p>\n\n\n\n<p>However, there are some inconveniences, such as limited storage capacity and the inability to access the database directly from external sources. To address these issues, we decided to migrate the internal database created in Outsystems to an external database while keeping the table definitions unchanged. Below are the results of this migration.<\/p>\n\n\n\n<h2><strong>Environment Information<\/strong><\/h2>\n\n\n\n<p>Personal Environment: Version 11.31.0 (Build 43948)<br>Service Studio: Version 11.54.80 \/ Build 63652<br><a href=\"https:\/\/www.outsystems.com\/forge\/component-overview\/1093\/data-extractor-o11\">Data Extractor<\/a>: 1.4.0<\/p>\n\n\n\n<h2><strong>About Data Extractor<\/strong><\/h2>\n\n\n\n<p>By using Data Extractor, freely available on the <a href=\"https:\/\/www.outsystems.com\/forge\/\">Forge<\/a>, you can obtain the actual table DDL corresponding to the Entities created in Outsystems. Here&#8217;s how to use it:<\/p>\n\n\n\n<ol><li>Install &#8220;Data Extractor&#8221; from the Forge.<\/li><li>Launch the application via &#8220;Open In Browser.&#8221;<img loading=\"lazy\" width=\"728\" height=\"460\" class=\"wp-image-5597\" style=\"width: 750px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-6.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-6.png 728w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-6-300x190.png 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/li><li>Log in by entering your ID and password.<\/li><li>Create a new snapshot by clicking &#8220;New Snapshot&#8221; on the top page.<img loading=\"lazy\" width=\"872\" height=\"216\" class=\"wp-image-5588\" style=\"width: 750px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image.png 872w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-300x74.png 300w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-768x190.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/li><li>Configure the new snapshot with the following settings:<br>\u30fbSnapshot Name: Give your snapshot a name. Any name is fine.<br>\u30fbExtract Configurations: Check the &#8220;Table DDL&#8221; option. Other items are optional.<br>\u30fbExtract Entities: Add the Entities for which you want to output the DDL to the list.<br>\u3000Use the &#8220;Search Entity to Add&#8221; feature to find Entities by prefix matching. Select the desired Entity and click &#8220;Add&#8221; to include it in the list.<br><strong>\u30fb<\/strong>Other Items: Optional. Configure as needed.<img loading=\"lazy\" width=\"1194\" height=\"692\" class=\"wp-image-5589\" style=\"width: 750px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-1.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-1.png 1194w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-1-300x174.png 300w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-1-1024x593.png 1024w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-1-768x445.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/li><li>Click the &#8220;Run&#8221; button. Your snapshot will appear in the list on the top page with the status &#8220;Created.&#8221; Once the status changes to &#8220;Done,&#8221; you can download it by clicking the &#8220;\u2193&#8221; icon on the far right.<img loading=\"lazy\" width=\"1239\" height=\"322\" class=\"wp-image-5590\" style=\"width: 750px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-2.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-2.png 1239w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-2-300x78.png 300w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-2-1024x266.png 1024w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-2-768x200.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/li><li>Contents of the downloaded Zip file:<br>\u30fb[TableName].csv.gz: Export of data registered in the Entity.<br>\u203bNote: In our testing environment, Japanese characters were displayed as &#8220;?&#8221; and could not be read correctly.<br>\u30fbTableDDL.Create.sql.gz: DDL of the actual table corresponding to the Entity.<br>\u203bIncludes the following:<br>\u3000\u30fbCreate Table statements<br>\u3000\u30fbAlter Table statements to add foreign key constraints to columns of the Entity Identifier type<br>\u3000\u30fbCreate Index statements to add indexes to columns of the Entity Identifier type<\/li><\/ol>\n\n\n\n<p>By executing the Create Table statements obtained through these steps, you can create tables with the same layout as the internal database on your own SQL Server.<img loading=\"lazy\" width=\"708\" height=\"130\" class=\"wp-image-5592\" style=\"width: 750px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-3.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-3.png 708w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-3-300x55.png 300w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><\/p>\n\n\n\n<p>To reference the tables created in the external database from Outsystems, you&#8217;ll need to create a Database Connection via the Service Center and then set up the connection to the tables through &#8220;Connect to External Table or View&#8221; in <a href=\"https:\/\/success.outsystems.com\/ja-jp\/documentation\/11\/reference\/integration_studio\/\">Integration Studio<\/a>.<img loading=\"lazy\" width=\"230\" height=\"342\" class=\"wp-image-5594\" style=\"width: 375px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-5.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-5.png 230w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-5-202x300.png 202w\" sizes=\"(max-width: 230px) 100vw, 230px\" \/><img loading=\"lazy\" width=\"308\" height=\"59\" class=\"wp-image-5593\" style=\"width: 375px;\" src=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-4.png\" alt=\"\" srcset=\"http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-4.png 308w, http:\/\/dandelions.co.jp\/blog\/wp\/wp-content\/uploads\/2024\/11\/image-4-300x57.png 300w\" sizes=\"(max-width: 308px) 100vw, 308px\" \/><\/p>\n\n\n\n<h2><strong>Summary<\/strong><\/h2>\n\n\n\n<ul><li>Outsystems provides an internal database by default.<\/li><li>To migrate to an external database, you can obtain the Entity&#8217;s DDL using the Data Extractor from the Forge.<ul><li>For data migration, alternative methods may be necessary since columns containing Japanese characters might become garbled.<\/li><\/ul><\/li><li>Referencing tables in the external database requires creating a Database Connection and setting up connections through it.<\/li><\/ul>\n\n\n\n<p>How did you find this guide? <br>We hope these steps will be helpful when you consider externalizing your own database in the future.<br>Our Unit 2 team will continue to share engineering blogs using low-code tools like OutSystems, so stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our engineering blog, where we share the learning experiences we&#8217;re engaged in daily. This ti &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/dandelions.co.jp\/blog\/blog\/2024\/11\/20\/engineering-blog-migrating-outsystems-database-to-an-external-db\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Engineering Blog: Migrating Outsystems Database to an External DB&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[8],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paR9rw-1sz","_links":{"self":[{"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts\/5615"}],"collection":[{"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=5615"}],"version-history":[{"count":3,"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts\/5615\/revisions"}],"predecessor-version":[{"id":5618,"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/posts\/5615\/revisions\/5618"}],"wp:attachment":[{"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=5615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=5615"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dandelions.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=5615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}