<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: kathrynvargas</title>
    <description>The latest articles on Forem by kathrynvargas (@kathrynvargas).</description>
    <link>https://forem.com/kathrynvargas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F151973%2F24606d9c-7ae9-4e5b-8d36-44c3a13faa42.jpg</url>
      <title>Forem: kathrynvargas</title>
      <link>https://forem.com/kathrynvargas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kathrynvargas"/>
    <language>en</language>
    <item>
      <title>Import MySQL to MongoDB in 5 Steps (Plus SQL Server, PostgreSQL, Oracle) </title>
      <dc:creator>kathrynvargas</dc:creator>
      <pubDate>Fri, 17 May 2019 15:36:58 +0000</pubDate>
      <link>https://forem.com/kathrynvargas/import-mysql-to-mongodb-in-5-steps-plus-sql-server-postgresql-oracle-40mn</link>
      <guid>https://forem.com/kathrynvargas/import-mysql-to-mongodb-in-5-steps-plus-sql-server-postgresql-oracle-40mn</guid>
      <description>&lt;p&gt;In this tutorial, we’ll show you the quickest way to import an entire SQL database to MongoDB using &lt;a href="https://studio3t.com/"&gt;Studio 3T&lt;/a&gt; and its new &lt;a href="https://studio3t.com/knowledge-base/articles/sql-to-mongodb-migration/"&gt;SQL Migration&lt;/a&gt; feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Your SQL database connection details. We’ll use MySQL in this tutorial but SQL Server, PostgreSQL, and Oracle are also supported.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Access to SQL Migration. Studio 3T offers a free 30-day trial &lt;a href="https://studio3t.com/download/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To illustrate a simple SQL database import, we’ll use the publicly available &lt;a href="https://dev.mysql.com/doc/world-setup/en/world-setup-installation.html"&gt;world&lt;/a&gt; database which contains three tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;city&lt;/li&gt;
&lt;li&gt;country&lt;/li&gt;
&lt;li&gt;countrylanguage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ll import each SQL table to a MongoDB collection, which means we should have three new collections in our target database.&lt;/p&gt;

&lt;h2&gt;
  
  
  1 – Open SQL Migration
&lt;/h2&gt;

&lt;p&gt;Click on &lt;strong&gt;SQL Migration &amp;gt; SQL -&amp;gt; MongoDB Migration&lt;/strong&gt; in the toolbar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PJ0ohKYb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/sql-migration-toolbar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PJ0ohKYb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/sql-migration-toolbar.png" alt="Open SQL Migration from the toolbar" title="Open SQL Migration from the toolbar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2 – Choose the source SQL connection
&lt;/h2&gt;

&lt;p&gt;Click on &lt;strong&gt;Click here to connect to a server&lt;/strong&gt; to open SQL Connection Manager.&lt;/p&gt;

&lt;h3&gt;
  
  
  Open a saved connection
&lt;/h3&gt;

&lt;p&gt;If you’ve already saved a connection, choose your source SQL connection from the list (we’ll use &lt;strong&gt;sql-database&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZFHduIt3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/open-sql-connection-manager.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZFHduIt3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/open-sql-connection-manager.png" alt="Open SQL Connection Manager" title="Open SQL Connection Manager"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a new connection
&lt;/h3&gt;

&lt;p&gt;To create a new SQL connection, click on &lt;strong&gt;New Connection&lt;/strong&gt;, enter the connection details under the &lt;strong&gt;Server&lt;/strong&gt; and &lt;strong&gt;SSH&lt;/strong&gt; tabs, and click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ty22chCb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/new-sql-connection.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ty22chCb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/new-sql-connection.png" alt="Create a new SQL connection" title="Create a new SQL connection"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  3 – Choose your target MongoDB connection
&lt;/h2&gt;

&lt;p&gt;Like Step 2, click on &lt;strong&gt;Click here to connect to a server&lt;/strong&gt; to choose an existing MongoDB connection or to &lt;a href="https://studio3t.com/knowledge-base/articles/connect-to-mongodb/#create-a-new-connection-e-g-connect-to-mongodb-localhost"&gt;create a new one&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here we’ll choose &lt;strong&gt;mongodb&lt;/strong&gt; as our target connection. This is where the three collections will be created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u2T7HOQI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/choose-target-mongodb-connection.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u2T7HOQI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/choose-target-mongodb-connection.png" alt="Choose target MongoDB connection" title="Choose target MongoDB connection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4 – Choose SQL source tables
&lt;/h2&gt;

&lt;p&gt;Studio 3T calls them “import units”, but an import unit simply means the SQL source table.&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Add import units&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We’ll choose the three &lt;strong&gt;world&lt;/strong&gt; tables – &lt;code&gt;city&lt;/code&gt;, &lt;code&gt;country&lt;/code&gt;, and &lt;code&gt;countrylanguage&lt;/code&gt; – to create a collection for each. &lt;/p&gt;

&lt;p&gt;By default, Studio 3T will map each table to a collection with the same name.&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. All three tables should appear in the Overview.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3zqC7LU5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/sql-source-tables.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3zqC7LU5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/sql-source-tables.png" alt="All SQL source tables should then appear in the Overview tab" title="All SQL source tables should then appear in the Overview tab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5 – Run the SQL import
&lt;/h2&gt;

&lt;p&gt;It’s time to run the SQL import. Click on &lt;strong&gt;Run Migration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fmsbQtpT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/run-migration.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fmsbQtpT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/run-migration.png" alt="Click on Run Migration in the toolbar" title="Click on Run Migration in the toolbar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Track your import in the Operations window on the bottom-left hand side.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6vcbzb5Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/operations-window-and-mongodb-collections.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6vcbzb5Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://studio3t.com/knowledge-base/wp-content/uploads/operations-window-and-mongodb-collections.png" alt="Track operations and double-check the MongoDB collections" title="Track operations and double-check the MongoDB collections"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Double-check that the &lt;strong&gt;world&lt;/strong&gt; database was imported in the Connection Tree (top-left).&lt;/p&gt;

&lt;p&gt;And finally, double-click on a collection (like &lt;code&gt;country&lt;/code&gt;, highlighted above) to check if the data looks correct (and it does!)&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;world&lt;/strong&gt; database is quite simple – requiring no one-to-one or one-to-many table relationships – so the default mappings are sufficient for this import.&lt;/p&gt;

&lt;p&gt;Note, however, that SQL Migration lets you fully control these mappings. Learn how to &lt;a href="https://dev.to/kathrynvargas/how-to-merge-multiple-sql-tables-into-one-mongodb-collection-50d8/"&gt;merge multiple SQL tables into one MongoDB collection&lt;/a&gt; to find out how you can use SQL Migration to do more complex imports.&lt;/p&gt;

&lt;p&gt;If you're working with both MongoDB and SQL, &lt;strong&gt;Studio 3T&lt;/strong&gt; makes it possible to &lt;a href="https://studio3t.com/knowledge-base/articles/sql-query/"&gt;query MongoDB with SQL&lt;/a&gt; and easily migrate data between the two databases. &lt;a href="https://studio3t.com/download/"&gt;Try it out, free for 30 days&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>sql</category>
      <category>mysql</category>
      <category>database</category>
    </item>
    <item>
      <title>How To Merge Multiple SQL Tables Into One MongoDB Collection</title>
      <dc:creator>kathrynvargas</dc:creator>
      <pubDate>Wed, 03 Apr 2019 16:46:58 +0000</pubDate>
      <link>https://forem.com/kathrynvargas/how-to-merge-multiple-sql-tables-into-one-mongodb-collection-50d8</link>
      <guid>https://forem.com/kathrynvargas/how-to-merge-multiple-sql-tables-into-one-mongodb-collection-50d8</guid>
      <description>&lt;p&gt;If you’re frequently moving data between SQL and MongoDB, chances are you’ve needed to do one or both of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Imported a single SQL table to a single MongoDB collection, and repeated the process 10, 20, 100 times to transfer the rest of your database&lt;/li&gt;
&lt;li&gt;Converted .sql files to JSON or CSV files to use for import&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But these methods simply flatten a SQL table to a MongoDB document, with default mappings that usually lead to cleanup horror.&lt;/p&gt;

&lt;p&gt;What if you want to reflect &lt;strong&gt;one-to-one and one-to-many table relationships in a JSON document&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Or let’s take it a step further: &lt;strong&gt;What if you want to create a new MongoDB collection – with data from multiple SQL tables and databases – and add, order, and remove fields as needed?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s how.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tale of two (or many) SQL databases
&lt;/h2&gt;

&lt;p&gt;Let’s say you have a simple MySQL database called &lt;strong&gt;customers&lt;/strong&gt;, which is how you keep track of people who have downloaded your app, ordered your product, signed up for your class, etc.&lt;/p&gt;

&lt;p&gt;At some point, maybe you’d want to know which &lt;strong&gt;countries&lt;/strong&gt; they come from. Or maybe in which &lt;strong&gt;continents&lt;/strong&gt; they’re located, in case you’re trying to figure out the ideal location for your second office.&lt;/p&gt;

&lt;p&gt;But turns out, you never collected this information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fincomplete-address-info.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fincomplete-address-info.png" title="SQL database missing country and continent" alt="SQL database missing country and continent info"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;_No country or continent information in sight._&lt;/center&gt;

&lt;p&gt;Enter the &lt;strong&gt;world&lt;/strong&gt; database, another MySQL database that’s publicly available, which contains three tables that will rescue us from this situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;country&lt;/li&gt;
&lt;li&gt;city&lt;/li&gt;
&lt;li&gt;countrylanguage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can then extend our customers’ location information by adding the fields &lt;code&gt;country&lt;/code&gt; and &lt;code&gt;continent&lt;/code&gt; to their profiles.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to merge multiple SQL tables
&lt;/h2&gt;

&lt;p&gt;Using the MongoDB GUI &lt;a href="https://studio3t.com/" rel="noopener noreferrer"&gt;Studio 3T&lt;/a&gt; and its &lt;a href="https://studio3t.com/knowledge-base/articles/sql-to-mongodb-migration/" rel="noopener noreferrer"&gt;SQL Migration&lt;/a&gt; feature, we can create a new MongoDB collection from multiple SQL datasets.&lt;/p&gt;

&lt;p&gt;We want a MongoDB collection that contains seven fields (I’ve also indicated their source SQL tables in parentheses):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;id (customers)&lt;/li&gt;
&lt;li&gt;first name (customers)&lt;/li&gt;
&lt;li&gt;last name (customers)&lt;/li&gt;
&lt;li&gt;email address (customers)&lt;/li&gt;
&lt;li&gt;city (customers, world)&lt;/li&gt;
&lt;li&gt;country (world)&lt;/li&gt;
&lt;li&gt;continent (world)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this new collection, we can answer two questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Which countries do our customers mostly come from?&lt;/li&gt;
&lt;li&gt;On which continent should we open our second office?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1 - Connect to the SQL database
&lt;/h2&gt;

&lt;p&gt;We connect to our MySQL &lt;strong&gt;customers&lt;/strong&gt; database directly through Studio 3T.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fsource-sql-connection.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fsource-sql-connection.png" title="Define the source SQL connection" alt="Define the source SQL connection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will be our source SQL connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  2 - Define the target MongoDB connection
&lt;/h2&gt;

&lt;p&gt;Then, we choose the target MongoDB database where we want to create our new collection, which is &lt;strong&gt;customer-support&lt;/strong&gt; in our example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ftarget-mongodb-connection.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ftarget-mongodb-connection.png" title="Define the target MongoDB connection" alt="Define the target MongoDB connection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 - Add SQL tables
&lt;/h2&gt;

&lt;p&gt;Studio 3T calls them “import units”, but an import unit is simply where we state the root SQL table for our import task.&lt;/p&gt;

&lt;p&gt;The root table can, of course, have relationships with other SQL tables (we’ll define these in a bit).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fadd-import-units-sql-migration.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fadd-import-units-sql-migration.png" title="Add import units in SQL Migration" alt="Map SQL to MongoDB"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we’ve added the import unit or root table &lt;code&gt;customers.customers&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next we’ll define its relationships to the other tables &lt;code&gt;world.city&lt;/code&gt;, and &lt;code&gt;world.country&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4 - Map SQL to MongoDB
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Mappings&lt;/strong&gt; tab is where all the magic happens.&lt;/p&gt;

&lt;p&gt;Here, we can define one-to-one and one-to-many relationships and add, edit, remove fields as we want – all before the migration job even takes place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fsql-to-mongodb-migration-studio-3t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fsql-to-mongodb-migration-studio-3t.png" title="Define SQL to MongoDB mappings in the Studio 3T import configuration tab" alt="Define SQL to MongoDB mappings in the Studio 3T import configuration tab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tab displays three views at once: Datasets View, Schema View and JSON Preview.&lt;/p&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;

&lt;p&gt;On the top-left is the &lt;strong&gt;Datasets View&lt;/strong&gt; which shows the datasets that are part of any given import.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fdatasets-view-600x300.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fdatasets-view-600x300.png" title="The Datasets view in the SQL to Migration feature" alt="The Datasets view in the SQL to Migration feature"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, we can see that the root table is &lt;code&gt;customers.customers&lt;/code&gt;, which has a one-to-one relationship with the &lt;code&gt;world.city&lt;/code&gt; and &lt;code&gt;world.country&lt;/code&gt; datasets. (We’ll discuss how to create one-to-one relationships shortly.)&lt;/p&gt;

&lt;p&gt;On the bottom-left is the &lt;strong&gt;Schema View&lt;/strong&gt;, where we can view all the fields involved in our import. Here, we can clean up the MongoDB collection before it’s even created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fschema-view-sql-to-mongodb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fschema-view-sql-to-mongodb.png" title="The Schema View in the SQL to MongoDB Migration feature" alt="The Schema View in the SQL to MongoDB Migration feature"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;JSON Preview&lt;/strong&gt;, on the right-hand side, is a handy way of confirming we’re on the right track.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fjson-preview-sql-to-mongodb-migration.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fjson-preview-sql-to-mongodb-migration.png" title="The JSON View in the SQL to MongoDB Migration feature" alt="The JSON View in the SQL to MongoDB Migration feature"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It shows us a preview of the final JSON document, so that we know we’re making the correct changes in the Datasets and Schema Views.&lt;/p&gt;

&lt;h2&gt;
  
  
  5 - Define one-to-one relationships
&lt;/h2&gt;

&lt;p&gt;Let’s quickly revisit our goal, which is to create a MongoDB collection with seven fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;id (customers)&lt;/li&gt;
&lt;li&gt;first name (customers)&lt;/li&gt;
&lt;li&gt;last name (customers)&lt;/li&gt;
&lt;li&gt;email address (customers)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;city (customers, world)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;country (world)&lt;/li&gt;
&lt;li&gt;continent (world)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see, bolded above is &lt;strong&gt;city&lt;/strong&gt;, the common field between the customers and world databases which we can match on.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;customers&lt;/strong&gt; database, this field is called &lt;code&gt;address.city&lt;/code&gt;; in the world database, it is called &lt;code&gt;Name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Note that using city as the unique ID doesn’t work in all cases (e.g. there is a Paris in Texas, a Berlin in Maryland, and so on), but still illustrates the functionality effectively.&lt;/p&gt;

&lt;p&gt;To create the one-to-one relationship, let’s go to Schema view, right-click on the root database, and choose &lt;strong&gt;Add one-to-one relationship&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fadd-one-to-one-relationship.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fadd-one-to-one-relationship.png" title="Right click on root to add a one-to-one relationship" alt="Right click on root to add a one-to-one relationship"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, we choose whether to specify the relationship manually or to get relationship from foreign keys. Here, we’ve chosen the manual approach.&lt;/p&gt;

&lt;p&gt;We define &lt;code&gt;customers&lt;/code&gt; as the parent dataset and &lt;code&gt;world.city&lt;/code&gt; as the child table, whose fields &lt;code&gt;address.city&lt;/code&gt; and &lt;code&gt;Name&lt;/code&gt; have a one-to-one relationship.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fone-to-one-relationship-city.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fone-to-one-relationship-city.png" title="Specify relationship manually" alt="Specify relationship manually"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, we want to create a new nested object called &lt;code&gt;location&lt;/code&gt;. Click OK.&lt;/p&gt;

&lt;p&gt;Hooray! We can immediately see in our JSON preview that a new nested field – &lt;code&gt;location&lt;/code&gt; – was added to our document.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fadding-location-as-nested-object.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fadding-location-as-nested-object.png" title="Adding a nested object" alt="Adding a nested object"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far we have added country information to our customers’ profiles.&lt;/p&gt;

&lt;p&gt;Next, let’s add their continent information by adding another one-to-one relationship, this time between &lt;code&gt;world.country&lt;/code&gt; and &lt;code&gt;world.city&lt;/code&gt; (which already has a relationship with our root table, &lt;code&gt;customers.customers&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Let’s go back to Schema view, right-click on root, and choose Add one-to-one relationship.&lt;/p&gt;

&lt;p&gt;This time, Studio 3T automatically detects the shared foreign key (CountryCode = Code) between the &lt;code&gt;world.city&lt;/code&gt; and &lt;code&gt;world.country&lt;/code&gt; datasets, because they come from the same database (world).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fone-to-one-relationship-from-foreign-keys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fone-to-one-relationship-from-foreign-keys.png" title="One-to-one relationships from foreign keys" alt="One-to-one relationships from foreign keys"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that you can always specify the relationship manually in case the automatically-detected mappings are incorrect.&lt;/p&gt;

&lt;p&gt;Let’s once again add the fields in another nested object, name it country, and click OK.&lt;/p&gt;

&lt;p&gt;And there it is in our JSON preview.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fcountry-nested-object.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fcountry-nested-object.png" title="Adding another nested object, which immediately appears in JSON preview" alt="Adding another nested object, which immediately appears in JSON preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two one-to-one relationships later, we now have successfully added the country and continent data points to our customers’ profiles.&lt;/p&gt;

&lt;p&gt;All we need is a little bit of cleanup.&lt;/p&gt;

&lt;h2&gt;
  
  
  6 - Clean up the MongoDB collection
&lt;/h2&gt;

&lt;p&gt;Remember how we only want seven fields in our new MongoDB collection?&lt;/p&gt;

&lt;p&gt;The good news is, Studio 3T lets us conveniently remove, rename, reorder fields, even change field types before our import from SQL to MongoDB even begins.&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove fields
&lt;/h3&gt;

&lt;p&gt;Simply select the unnecessary fields, right-click, and choose Remove selected fields.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fremove-fields-from-sql-import-to-mongodb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fremove-fields-from-sql-import-to-mongodb.png" title="Remove selected fields from the SQL import to MongoDB" alt="Remove selected fields from the SQL import to MongoDB"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The JSON preview handily reflects these changes immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fmongodb-schema-cleanup-json-preview.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fmongodb-schema-cleanup-json-preview.png" title="The JSON preview handily reflects the schema cleanup efforts" alt="The JSON preview handily reflects the schema cleanup efforts"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we’ve whittled it down to the seven fields we want, let’s give them their correct names.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rename fields
&lt;/h3&gt;

&lt;p&gt;To rename fields, simply double-click on a cell and type the new name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Frename-fields-schema-view.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Frename-fields-schema-view.png" title="Rename fields while in Schema View simply by double-clicking" alt="Rename fields while in Schema View simply by double-clicking"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Reorder fields
&lt;/h3&gt;

&lt;p&gt;Now, let’s move the fields &lt;code&gt;city&lt;/code&gt;, &lt;code&gt;country&lt;/code&gt;, and &lt;code&gt;continent&lt;/code&gt; out of their nested objects to the parent level.&lt;/p&gt;

&lt;p&gt;We do this simply by dragging the field – one at a time – to its desired location.&lt;/p&gt;

&lt;p&gt;You can also move fields in non-nested objects by clicking on the up and down arrows in the toolbar.&lt;/p&gt;

&lt;h3&gt;
  
  
  Treating duplicate fields
&lt;/h3&gt;

&lt;p&gt;Studio 3T flags instances of duplicate fields, which is actually the case for the field &lt;code&gt;country&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ferror-message-duplicate-field.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ferror-message-duplicate-field.png" title="The field country turns out to be a duplicate field" alt="The field country turns out to be a duplicate field"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good thing renaming fields is easy. All we need to do is rename the nested object (in this case, to &lt;code&gt;country-info&lt;/code&gt;) and drag &lt;code&gt;country&lt;/code&gt; to the parent level.&lt;/p&gt;

&lt;p&gt;Finally, we’re left with the seven fields we want and two nested object fields we can easily delete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fdelete-fields-schema-view.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fdelete-fields-schema-view.png" title="Delete fields in Schema View" alt="Delete fields in Schema View"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JSON preview looks good – except that &lt;code&gt;_id&lt;/code&gt; field looks a bit funny.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ffinal-json-preview-check.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ffinal-json-preview-check.png" title="The _jd field in JSON preview looks a bit funny" alt="The _jd field in JSON preview looks a bit funny"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks like Studio 3T autodetected it as field type Binary instead of String.&lt;/p&gt;

&lt;h3&gt;
  
  
  Change field types
&lt;/h3&gt;

&lt;p&gt;Studio 3T lets us change field types directly in Schema view as well.&lt;/p&gt;

&lt;p&gt;Right-click on the field, choose Edit/Rename, then choose the right field type from the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fchange-field-types-schema-view.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fchange-field-types-schema-view.png" title="Changing field types within Schema view is quick and easy" alt="Changing field types within Schema view is quick and easy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The JSON preview looks perfect – now it’s time to run the SQL to MongoDB migration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fclean-final-json-preview.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fclean-final-json-preview.png" title="The final JSON preview with the seven fields we want" alt="The final JSON preview with the seven fields we want"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  7 - Run the SQL to MongoDB migration
&lt;/h2&gt;

&lt;p&gt;SQL Migration gives us two migration options: Run migration or Run selected units.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run migration&lt;/strong&gt; does exactly as it states – it runs the migration and outputs one MongoDB collection per import unit. Choose &lt;strong&gt;Run selected units&lt;/strong&gt; if you’re handpicking multiple import units from the list.&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;Run migration&lt;/strong&gt; in the toolbar:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Frun-selected-units.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Frun-selected-units.png" title="Choose Run migration from the toolbar" alt="Choose Run migration from the toolbar"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Confirm that you want the data to be imported to one collection, and click OK.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fimport-sql-to-one-collection.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fimport-sql-to-one-collection.png" title="Import SQL data to one collection" alt="Import SQL data to one collection"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;You can always track the progress of the migration task in the Operations window on the lower-left corner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Foperations-window.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Foperations-window.png" title="The Operations window in Studio 3T" alt="The Operations window in Studio 3T"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  8 - Double-check the MongoDB collection
&lt;/h2&gt;

&lt;p&gt;We’ve done it!&lt;/p&gt;

&lt;p&gt;For good measure, let’s double-check that our new MongoDB collection is in indeed the &lt;strong&gt;customer-support&lt;/strong&gt; database.&lt;/p&gt;

&lt;p&gt;Go to the Connection Tree in Studio 3T and locate our target MongoDB connection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fconnection-tree-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fconnection-tree-1.png" title="Locate your MongoDB collection in the Connection Tree" alt="Locate your MongoDB collection in the Connection Tree"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://studio3t.com/knowledge-base/articles/table-view/" rel="noopener noreferrer"&gt;Table View&lt;/a&gt;, &lt;a href="https://studio3t.com/knowledge-base/articles/tree-view/" rel="noopener noreferrer"&gt;Tree View&lt;/a&gt;, or &lt;a href="https://studio3t.com/knowledge-base/articles/json-view/" rel="noopener noreferrer"&gt;JSON View&lt;/a&gt;, double-check that everything looks correct (and it does!)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fdouble-check-mongodb-collection-table-view.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Fdouble-check-mongodb-collection-table-view.png" title="Double-checking the final MongoDB collection using Table View" alt="Double-checking the final MongoDB collection using Table View"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;So, where do our customers mostly come from?&lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://studio3t.com/knowledge-base/articles/schema-explorer/" rel="noopener noreferrer"&gt;Schema Explorer&lt;/a&gt; – a separate but equally handy feature – we can see at a glance that our customers mostly come from the US.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ftop-country.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ftop-country.png" title="Schema Explorer lets us see at a glance that most of our customers come from the US" alt="Schema Explorer lets us see at a glance that most of our customers come from the US"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks like it’s going to be a North American office after all.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ftop-city.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fstudio3t.com%2Fknowledge-base%2Fwp-content%2Fuploads%2Ftop-city.png" title="A list of cities where customers come from" alt="A list of cities where customers come from"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And definitely East Coast.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>mongodb</category>
      <category>database</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
