{"id":1794,"date":"2013-07-08T10:00:00","date_gmt":"2013-07-08T08:00:00","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1794"},"modified":"2017-03-01T07:39:01","modified_gmt":"2017-03-01T15:39:01","slug":"sql-nosql-copy-your-data-mysql-couchbase","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/","title":{"rendered":"SQL to NoSQL : Copy your data from MySQL to Couchbase"},"content":{"rendered":"<p style=\"margin-bottom: 0px; font-family: ff-kievit-web, 'MS UI Gothic', 'MS PGothic', Osaka, Batang, Georgia, 'Times New Roman', Times, sans-serif; font-size: 16px;\"><em style=\"line-height: 23px; font-size: 1em; font-family: ff-meta-serif-web-pro-1, ff-meta-serif-web-pro-2, Georgia, 'Times New Roman', Times, serif;\">[This blog was syndicated from https:\/\/blog.grallandco.com]<\/em><\/p>\n<div><\/div>\n<div>\n<h2><span style=\"line-height: 1;\">Introduction<\/span><\/h2>\n<div>During my last interactions with the Couchbase community, I had the question how can I easily import my data from my current database into Couchbase. And my answer was always the same:<\/div>\n<ul>\n<li>Take an ETL such as Talend to do it<\/li>\n<li><span style=\"line-height: 1;\">Just write a small program to copy the data from your RDBMS to Couchbase&#8230;<\/span><\/li>\n<\/ul>\n<div>So I have written this small program that allows you to import the content of a RDBMS into Couchbase. This tools could be used as it is, or you can look at the code to adapt it to your application.<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div><a href=\"https:\/\/www.youtube.com\/watch?v=xzqBjhYKCLY\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2885 size-full aligncenter\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2013\/07\/couchbase-sql-importer-video-thumbnail.jpg\" alt=\"couchbase-sql-importer-video-thumbnail\" width=\"351\" height=\"198\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2013\/07\/couchbase-sql-importer-video-thumbnail.jpg 351w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2013\/07\/couchbase-sql-importer-video-thumbnail-300x169.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2013\/07\/couchbase-sql-importer-video-thumbnail-20x11.jpg 20w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/a><\/div>\n<div><\/div>\n<h2>The Tool: Couchbase SQL Importer<\/h2>\n<div>The Couchbase SQL Importer, available <a href=\"https:\/\/github.com\/tgrall\/couchbase-sql-importer\">here<\/a>, allows you with a simple command line to copy all -or part of- your SQL schema into Couchbase. Before explaining how to run this command, let&#8217;s see how the data are stored into Couchbase when they are imported:<\/div>\n<ul>\n<li><span style=\"line-height: 1;\">Each table row is imported a single JSON document<\/span>\n<ul>\n<li>where each table column becomes a JSON attribute<\/li>\n<\/ul>\n<\/li>\n<li>Each document as a key made of the name of the table and a counter (increment)<\/li>\n<\/ul>\n<div>The following concrete example, based on the <a href=\"https:\/\/dev.mysql.com\/doc\/world-setup\/en\/index.html\">MySQL World sample database<\/a>, will help you to understand how it works. This database contains 3 tables : City, Country, CountryLanguage. The City table looks like:<\/div>\n<blockquote>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| Field \u00a0 \u00a0 \u00a0 | Type \u00a0 \u00a0 | Null | Key | Default | Extra \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| ID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| int(11) \u00a0| NO \u00a0 | PRI | NULL \u00a0 \u00a0| auto_increment |<br \/>\n| Name \u00a0 \u00a0 \u00a0 \u00a0| char(35) | NO \u00a0 | \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n| CountryCode | char(3) \u00a0| NO \u00a0 | \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n| District \u00a0 \u00a0| char(20) | NO \u00a0 | \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n| Population \u00a0| int(11) \u00a0| NO \u00a0 | \u00a0 \u00a0 | 0 \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;-+<\/div>\n<\/div>\n<\/blockquote>\n<div>The JSON document that matches this table looks like the following:<\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">city:3805<br \/>\n{<br \/>\n&#8220;Name&#8221;: &#8220;San Francisco&#8221;,<br \/>\n&#8220;District&#8221;: &#8220;California&#8221;,<br \/>\n&#8220;ID&#8221;: 3805,<br \/>\n&#8220;Population&#8221;: 776733,<br \/>\n&#8220;CountryCode&#8221;: &#8220;USA&#8221;<br \/>\n}<\/div>\n<\/div>\n<\/div>\n<div>You see that here I am simply taking all the rows and &#8220;moving&#8221; them into Couchbase. This is a good first step to play with your dataset into Couchbase, but it is probably not the final model you want to use for your application; most of the time you will have to see when to use embedded documents, list of values, .. into your JSON documents.<\/div>\n<div>In addition to the JSON document the tool create views based on the following logic:<\/div>\n<ul>\n<li>a view that list all imported documents with the name of the &#8220;table&#8221; (aka type) as key<\/li>\n<li>a view for each table with the primary key columns<\/li>\n<\/ul>\n<div>View: all\/by_type<\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">{<br \/>\n&#8220;rows&#8221;: [<br \/>\n{&#8220;key&#8221;: &#8220;city&#8221;, &#8220;value&#8221;: 4079},<br \/>\n{&#8220;key&#8221;: &#8220;country&#8221;, &#8220;value&#8221;: 239},<br \/>\n{&#8220;key&#8221;: &#8220;countrylanguage&#8221;, &#8220;value&#8221;: 984}<br \/>\n]<br \/>\n}<\/div>\n<\/div>\n<\/div>\n<div>As you can see this view allows you to get with a single Couchbase query the number of document by type.<\/div>\n<div>Also for each table\/document type, a view is created where the key of the index is built from the table primary key. Let&#8217;s for example query the &#8220;City&#8221; documents.<\/div>\n<div>View: city\/by_pk?reduce=false&amp;limit=5<\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">{<br \/>\n&#8220;total_rows&#8221;: 4079,<br \/>\n&#8220;rows&#8221;: [<br \/>\n{&#8220;id&#8221;: &#8220;city:1&#8221;, &#8220;key&#8221;: 1, &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;city:2&#8221;, &#8220;key&#8221;: 2, &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;city:3&#8221;, &#8220;key&#8221;: 3, &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;city:4&#8221;, &#8220;key&#8221;: 4, &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;city:5&#8221;, &#8220;key&#8221;: 5, &#8220;value&#8221;: null}<br \/>\n]<br \/>\n}<\/div>\n<\/div>\n<\/div>\n<div>The index key matches the value of the City.ID column. \u00a0When the primary key is made of multiple columns the key looks like:<\/div>\n<div>View: CountryLanguage\/by_pk?reduce=false&amp;limit=5<\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">{<br \/>\n&#8220;total_rows&#8221;: 984,<br \/>\n&#8220;rows&#8221;: [<br \/>\n{&#8220;id&#8221;: &#8220;countrylanguage:1&#8221;, &#8220;key&#8221;: [&#8220;ABW&#8221;, &#8220;Dutch&#8221;], &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;countrylanguage:2&#8221;, &#8220;key&#8221;: [&#8220;ABW&#8221;, &#8220;English&#8221;], &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;countrylanguage:3&#8221;, &#8220;key&#8221;: [&#8220;ABW&#8221;, &#8220;Papiamento&#8221;], &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;countrylanguage:4&#8221;, &#8220;key&#8221;: [&#8220;ABW&#8221;, &#8220;Spanish&#8221;], &#8220;value&#8221;: null},<br \/>\n{&#8220;id&#8221;: &#8220;countrylanguage:5&#8221;, &#8220;key&#8221;: [&#8220;AFG&#8221;, &#8220;Balochi&#8221;], &#8220;value&#8221;: null}<br \/>\n]<br \/>\n}<\/div>\n<\/div>\n<\/div>\n<div>This view is built from the CountryLanguage table primary key made of CountryLanguage.CountryCode and CountryLanguage.Language columns.<\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+<br \/>\n| Field \u00a0 \u00a0 \u00a0 | Type \u00a0 \u00a0 \u00a0 \u00a0 \u00a0| Null | Key | Default | Extra |<br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+<br \/>\n| CountryCode | char(3) \u00a0 \u00a0 \u00a0 | NO \u00a0 | PRI | \u00a0 \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 |<br \/>\n| Language \u00a0 \u00a0| char(30) \u00a0 \u00a0 \u00a0| NO \u00a0 | PRI | \u00a0 \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 |<br \/>\n| IsOfficial \u00a0| enum(&#8216;T&#8217;,&#8217;F&#8217;) | NO \u00a0 | \u00a0 \u00a0 | F \u00a0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 |<br \/>\n| Percentage \u00a0| float(4,1) \u00a0 \u00a0| NO \u00a0 | \u00a0 \u00a0 | 0.0 \u00a0 \u00a0 | \u00a0 \u00a0 \u00a0 |<br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+<\/div>\n<\/div>\n<\/div>\n<div><strong>How to use Couchbase SQL Importer tool?\u00a0<\/strong><\/div>\n<div>The importer is a simple Java based command line utility, quite simple to use:<\/div>\n<div>1. Download the <a href=\"https:\/\/goo.gl\/IF89e\">CouchbaseSqlImporter.jar file from here<\/a>. This file is contains all the dependencies to work with Couchbase: the Java Couchbase Client, and GSON.<\/div>\n<div>2. Download the JDBC driver for the database you are using as data source. For this example I am using MySQL and I have download the driver for MySQL Site.<\/div>\n<div>3. Configure the import using a properties file.<\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">## SQL Information ##<br \/>\nsql.connection=jdbc:mysql:\/\/192.168.99.19:3306\/world<br \/>\nsql.username=root<br \/>\nsql.password=password## Couchbase Information ##<br \/>\ncb.uris=https:\/\/localhost:8091\/pools<br \/>\ncb.bucket=default<br \/>\ncb.password=## Import information<br \/>\nimport.tables=ALL<br \/>\nimport.createViews=true<br \/>\nimport.typefield=type<br \/>\nimport.fieldcase=lower<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div>This sample properties file contains three sections :<\/div>\n<ul>\n<li>The two first sections are used to configure the connections to your SQL database and Couchbase cluster (note that the bucket must be created first)<\/li>\n<li>The third section allow you to configure the import itself\n<ul>\n<li><span style=\"font-family: 'Courier New', Courier, monospace;\">import.tables<\/span>\u00a0: ALL to import all tables, or a the list of tables you want to import, for example City, Country<\/li>\n<li><span style=\"font-family: 'Courier New', Courier, monospace;\">import.createViews<\/span>\u00a0: true or false, to force the creation of the views.<\/li>\n<li><span style=\"font-family: 'Courier New', Courier, monospace;\">import.typefield<\/span>\u00a0: this is use to add a new attribute in all documents that contains the &#8220;type&#8221;.<\/li>\n<li><span style=\"font-family: 'Courier New', Courier, monospace;\">import.fieldcase<\/span>\u00a0: null, lower, upper : this will force the case of the attributes name and the value of the type (City or city or CITY for example)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li><span style=\"line-height: 1;\">4. Run the tool !<\/span><\/li>\n<\/ul>\n<div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace;\">java -cp &#8220;.\/CouchbaseSqlImporter.jar:.\/mysql-connector-java-5.1.25-bin.jar&#8221; com.couchbase.util.SqlImporter import.properties<\/div>\n<\/div>\n<\/div>\n<div>So you run the Java command with the proper classpath (-cp parameter).<\/div>\n<div>And you are done, you can get your data from your SQL database into Couchbase.<\/div>\n<div>If you are interested to see how it is working internally, you can take a look to the next paragraph.<\/div>\n<h2>The Code: How it works?<\/h2>\n<div>The main class of the tool is really simple \u00a0<a href=\"https:\/\/github.com\/tgrall\/couchbase-sql-importer\/blob\/master\/sql-importer-lib\/src\/main\/java\/com\/couchbase\/util\/SqlImporter.java\">com.couchbase.util.SqlImporter<\/a>, the process is:<\/div>\n<div>1. Connect to the SQL database<\/div>\n<div>2. Connect to Couchbase<\/div>\n<div>3. Get the list of tables<\/div>\n<div>4. For each tables execute a &#8220;select * from table&#8221;<\/div>\n<div>\u00a0 4.1. Analyze the ResultSetMetadata to get the list of columns<\/div>\n<div>\u00a0 4.2. Create a Java map for each rows where the key is the name of the columns and the value\u2026is the value<\/div>\n<div>\u00a0 4.3. Serialize this Map into a GSON document and save it into Couchbase<\/div>\n<div>The code is available in the <a href=\"https:\/\/github.com\/tgrall\/couchbase-sql-importer\/blob\/master\/sql-importer-lib\/src\/main\/java\/com\/couchbase\/util\/SqlImporter.java#L212\">ImportTable(String table)<\/a> Java method.<\/div>\n<div>One interesting point is that you can use and extend the code to deal with your application.<\/div>\n<h2>Conclusion<\/h2>\n<div>I have created this tool quickly to help some people in the community, if you are using it and need new features, let me know, using comment or pull request.<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>[This blog was syndicated from https:\/\/blog.grallandco.com] Introduction During my last interactions with the Couchbase community, I had the question how can I easily import my data from my current database into Couchbase. And my answer was always the same: Take [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[8968],"class_list":["post-1794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL to NoSQL : Copy your data from MySQL to Couchbase - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL to NoSQL : Copy your data from MySQL to Couchbase\" \/>\n<meta property=\"og:description\" content=\"[This blog was syndicated from https:\/\/blog.grallandco.com] Introduction During my last interactions with the Couchbase community, I had the question how can I easily import my data from my current database into Couchbase. And my answer was always the same: Take [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-07-08T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-03-01T15:39:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"The Couchbase Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"The Couchbase Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\"},\"author\":{\"name\":\"The Couchbase Team\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/764f4a6771ee19bc7af70b70a326fb93\"},\"headline\":\"SQL to NoSQL : Copy your data from MySQL to Couchbase\",\"datePublished\":\"2013-07-08T08:00:00+00:00\",\"dateModified\":\"2017-03-01T15:39:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\"},\"wordCount\":1077,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\",\"name\":\"SQL to NoSQL : Copy your data from MySQL to Couchbase - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2013-07-08T08:00:00+00:00\",\"dateModified\":\"2017-03-01T15:39:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL to NoSQL : Copy your data from MySQL to Couchbase\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/764f4a6771ee19bc7af70b70a326fb93\",\"name\":\"The Couchbase Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/7befc37d02226b59499817eafdec60c3\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g\",\"caption\":\"The Couchbase Team\"},\"description\":\"Jennifer Garcia is a Senior Web Manager at Couchbase Inc. As the website manager, Jennifer has overall responsibility for the website properties including design, implementation, content, and performance.\",\"sameAs\":[\"https:\/\/www.couchbase.com\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/jennifer-garcia\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL to NoSQL : Copy your data from MySQL to Couchbase - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/","og_locale":"en_US","og_type":"article","og_title":"SQL to NoSQL : Copy your data from MySQL to Couchbase","og_description":"[This blog was syndicated from https:\/\/blog.grallandco.com] Introduction During my last interactions with the Couchbase community, I had the question how can I easily import my data from my current database into Couchbase. And my answer was always the same: Take [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/","og_site_name":"The Couchbase Blog","article_published_time":"2013-07-08T08:00:00+00:00","article_modified_time":"2017-03-01T15:39:01+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"The Couchbase Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"The Couchbase Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/"},"author":{"name":"The Couchbase Team","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/764f4a6771ee19bc7af70b70a326fb93"},"headline":"SQL to NoSQL : Copy your data from MySQL to Couchbase","datePublished":"2013-07-08T08:00:00+00:00","dateModified":"2017-03-01T15:39:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/"},"wordCount":1077,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/","url":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/","name":"SQL to NoSQL : Copy your data from MySQL to Couchbase - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2013-07-08T08:00:00+00:00","dateModified":"2017-03-01T15:39:01+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/sql-nosql-copy-your-data-mysql-couchbase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL to NoSQL : Copy your data from MySQL to Couchbase"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/764f4a6771ee19bc7af70b70a326fb93","name":"The Couchbase Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/7befc37d02226b59499817eafdec60c3","url":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g","caption":"The Couchbase Team"},"description":"Jennifer Garcia is a Senior Web Manager at Couchbase Inc. As the website manager, Jennifer has overall responsibility for the website properties including design, implementation, content, and performance.","sameAs":["https:\/\/www.couchbase.com"],"url":"https:\/\/www.couchbase.com\/blog\/author\/jennifer-garcia\/"}]}},"authors":[{"term_id":8968,"user_id":2,"is_guest":0,"slug":"jennifer-garcia","display_name":"The Couchbase Team","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b4c18c758421903398e84d6c9560f319f39c665798d7d23e6a6f9dff8a8f984e?s=96&d=mm&r=g","author_category":"","last_name":"Garcia","first_name":"Jennifer","job_title":"","user_url":"https:\/\/www.couchbase.com","description":"Jennifer Garcia is a Senior Web Manager at Couchbase Inc. As the website manager, Jennifer has overall responsibility for the website properties including design, implementation, content, and performance."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1794"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1794\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1794"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}