{"id":2959,"date":"2017-03-14T14:35:15","date_gmt":"2017-03-14T21:35:15","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2959"},"modified":"2023-06-19T03:21:50","modified_gmt":"2023-06-19T10:21:50","slug":"fakeit-series-generating-fake-data","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/","title":{"rendered":"FakeIt Series 1 of 5: Generating Fake Data"},"content":{"rendered":"<p>Aaron Benton is an experienced architect who specializes in creative solutions to develop innovative mobile applications. He has over 10 years experience in full stack development, including ColdFusion, SQL, NoSQL, JavaScript, HTML, and CSS. Aaron is currently an Applications Architect for Shop.com in Greensboro, North Carolina and is a <a href=\"https:\/\/developer.couchbase.com\/experts-and-champions\">Couchbase Community Champion<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2974\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg\" alt=\"Aaron Benton\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-150x150.jpg 150w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-768x768.jpg 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-65x65.jpg 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-50x50.jpg 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-20x20.jpg 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000.jpg 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2><em><strong>FakeIt Series 1 of 5: Generating Fake Data<\/strong><\/em><\/h2>\n<p>There are countless blog posts on <u><a href=\"https:\/\/www.couchbase.com\/blog\/category\/data-modeling\/\" target=\"_blank\" rel=\"noopener noreferrer\">data modeling<\/a><\/u>, key and document patterns. All of these posts give a great introduction into how to structure and model your documents in Couchbase, but none of them tell you what to do next. In this blog series we are going to answer the question, what do you after you&#8217;ve defined your data model?<\/p>\n<h3><strong>Users Model<\/strong><\/h3>\n<p>For this series we will be working with a greenfield e-commerce application. As with most e-commerce applications, our application is going to have users so this is where we will begin.<\/p>\n<p>We have defined a basic user model to start with.<\/p>\n<pre class=\"lang:default decode:true\">{\r\n\u00a0\"_id\": \"user_0\",\r\n\u00a0\"doc_type\": \"user\",\r\n\u00a0\"user_id\": 0,\r\n\u00a0\"first_name\": \"Mac\",\r\n\u00a0\"last_name\": \"Carter\",\r\n\u00a0\"username\": \"Salma.Ratke\",\r\n\u00a0\"password\": \"DvA6YrMGtgsKKnG\",\r\n\u00a0\"email_address\": \"Ludie74@hotmail.com\",\r\n\u00a0\"created_on\": 1457172796088\r\n}\r\n\r\n<\/pre>\n<p>We&#8217;ve done the hardest part, which is defining our model, but now what?<\/p>\n<ul>\n<li>How do we represent this model?<\/li>\n<li>How do we document this model?<\/li>\n<li>Does this model rely on data from other models?<\/li>\n<li>How can data be generated from this model?<\/li>\n<li>How can we generate fake \/ test data?<\/li>\n<\/ul>\n<p>Luckily for us there is a\u00a0NodeJS project called <u><a href=\"https:\/\/github.com\/bentonam\/fakeit\" target=\"_blank\" rel=\"noopener noreferrer\">FakeIt<\/a><\/u>\u00a0that can answer all of these questions for us. <u><a href=\"https:\/\/github.com\/bentonam\/fakeit\" target=\"_blank\" rel=\"noopener noreferrer\">FakeIt<\/a><\/u>\u00a0is a command-line utility that generates fake data in json, yaml, yml, cson, or csv formats based on models which are defined in yaml. Data can be generated using any combination of FakerJS, ChanceJS, or Custom Functions. The generated data can be output in the following formats and destinations:<\/p>\n<ul>\n<li>json<\/li>\n<li>yaml<\/li>\n<li>cson<\/li>\n<li>csv<\/li>\n<li>Zip Archive of json, yaml, cson or csv files<\/li>\n<li>Couchbase Server<\/li>\n<li>Couchbase Sync Gateway Server<\/li>\n<\/ul>\n<p>We can define a FakeIt model in YAML to represent our JSON model. This provides us a documented and data-typed model that we can communicate how our model should be structure and what the properties are for.<\/p>\n<pre class=\"lang:default decode:true\">name:\u00a0Users\r\ntype:\u00a0object\r\nkey:\u00a0_id\r\nproperties:\r\n\u00a0 _id:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The document id built by the prefixed \"user_\"\u00a0and the users id\r\n\u00a0 doc_type:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The document type\r\n\u00a0 user_id:\r\n\u00a0 \u00a0 type:\u00a0integer\r\n\u00a0 \u00a0 description:\u00a0The users id\r\n\u00a0 first_name:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users first name\r\n\u00a0 last_name:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users last name\r\n\u00a0 username:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users username\r\n\u00a0 password:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users password\r\n\u00a0 email_address:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users email address\r\n\u00a0 created_on:\r\n\u00a0 \u00a0 type:\u00a0integer\r\n\u00a0 \u00a0 description:\u00a0An epoch time of when the user was created\r\n\r\n<\/pre>\n<p>You&#8217;re probably saying to yourself, <em>\u201c<\/em><em>great, I&#8217;ve defined my model in YAML but what good does this do me?<\/em><em>\u201d <\/em>One of the biggest issues developers face when beginning development is having data to work with. Often times an exorbitant amount of time is spent manually creating documents, writing throw away code to populate a bucket. Additionally you may have a full or partial data dump of your database that has to be imported.<\/p>\n<p>These are time consuming, tedious and in the case of a data dump do not provide any insight or documentation into the available models. We can add a few simple properties to our FakeIt model describing how our model should be generated, and through a single file we can create an endless amount of fake randomized documents.<\/p>\n<pre class=\"lang:default decode:true\">name:\u00a0Users\r\ntype:\u00a0object\r\nkey:\u00a0_id\r\nproperties:\r\n\u00a0 _id:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The document id built by the prefix \"user_\"\u00a0and the users id\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 post_build:\u00a0`user_${this.user_id}`\r\n\u00a0 doc_type:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The document type\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 value:\u00a0user\r\n\u00a0 user_id:\r\n\u00a0 \u00a0 type:\u00a0integer\r\n\u00a0 \u00a0 description:\u00a0An auto-incrementing number\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0document_index\r\n\u00a0 first_name:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users first name\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.name.firstName()\r\n\u00a0 last_name:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users last name\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.name.lastName()\r\n\u00a0 username:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The username\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.internet.userName()\r\n\u00a0 password:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users password\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.internet.password()\r\n\u00a0 email_address:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users email address\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.internet.email()\r\n\u00a0 created_on:\r\n\u00a0 \u00a0 type:\u00a0integer\r\n\u00a0 \u00a0 description:\u00a0An epoch time of when the user was created\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0new Date(faker.date.past()).getTime()\r\n\r\n<\/pre>\n<p>We have added a data\u00a0property to each of our models properties describing how that value should be generated. FakeIt supports 5 different ways to generate a value:<\/p>\n<ul>\n<li><strong>pre_build:<\/strong>\u00a0function to initialize the value<\/li>\n<li><strong>build:<\/strong>\u00a0function that builds a value<\/li>\n<li><strong>fake:<\/strong>\u00a0A FakerJS template string i.e. {{internet.userName}}<\/li>\n<li><strong>value:<\/strong>\u00a0A static value to use<\/li>\n<li><strong>post_build:<\/strong>\u00a0a function that runs after every property in the model has been set<\/li>\n<\/ul>\n<p>These build functions are a JavaScript function body. Each of these functions is passed the following variables that can be used at the time of its execution:<\/p>\n<ul>\n<li>documents\u00a0&#8211; An object containing a key for each model whose value is an array of each document that has been generated<\/li>\n<li>globals\u00a0&#8211; An object containing any global variables that may have been set by any of the run or build functions<\/li>\n<li>inputs\u00a0&#8211; An object containing a key for each input file used whose value is the deserialized version of the files data<\/li>\n<li>faker\u00a0&#8211; A reference to FakerJS<\/li>\n<li>chance\u00a0&#8211; A reference to ChanceJS<\/li>\n<li>document_index\u00a0&#8211; This is a number that represents the currently generated document&#8217;s position in the run order<\/li>\n<li>require\u00a0&#8211; This is the node require function, it allows you to require your own packages. For better performance require and seth them in the pre_run function.<\/li>\n<\/ul>\n<p>For example, if we look at the username\u00a0properties build function it would look like this:<\/p>\n<pre class=\"lang:default decode:true\">function\u00a0(documents, globals, inputs, faker, chance, document_index, require) {\r\n\u00a0return\u00a0faker.internet.userName();\r\n}\r\n\r\n<\/pre>\n<p>Now that we have defined how our model should be generated, we can start to generate some fake data with it.<\/p>\n<p>With our users model saved to a file models\/users.yaml, we can output data directly to the console using the command<\/p>\n<pre class=\"lang:default decode:true \">fakeit console models\/users.yaml\r\n\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5695 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog1-example1-compressor.gif\" alt=\"blog1 example1\" width=\"800\" height=\"529\" \/><\/p>\n<p>Using this same model we can generate 100 JSON files and save them into a directory named output\/\u00a0using the command<\/p>\n<pre class=\"lang:default decode:true \">fakeit directory \u2013count 100 \u2013verbose output models\/users.yaml\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5699 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog1-example2-compressor.gif\" alt=\"blog 1 example 2\" width=\"800\" height=\"529\" \/><\/p>\n<p>Additionally, we can create a zip archive of 1,000 JSON files using the command:<\/p>\n<div>\n<pre class=\"lang:default decode:true \">fakeit directory \u2013count 1000 \u2013verbose output\/users.zip models\/users.yaml\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog1-example3.gif\" alt=\"blog1 example3\" \/><\/p>\n<\/div>\n<p>We can even generate a single CSV file of our model using the following command:<\/p>\n<div>\n<pre class=\"lang:default decode:true \">fakeit directory \u2013count 25 \u2013format csv \u2013verbose output\/ models\/users.yaml\r\n<\/pre>\n<p>This will create a single CSV file whose name is the name of the model, in this case name: Users with the resulting file being named Users.csv<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5698 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog1-example4-compressor.gif\" alt=\"\" width=\"800\" height=\"463\" \/><\/p>\n<p>Whether you are using JSON files, Zip Archives or CSV files all of these can be imported into Couchbase Server by using the CLI tools <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/cli\/cbdocloader-tool.html\" target=\"_blank\" rel=\"noopener noreferrer\">cbdocloader<\/a><\/u>\u00a0(for *.json and *.zip files) or <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/tools\/cbimport.html\" target=\"_blank\" rel=\"noopener noreferrer\">cbimport<\/a><\/u>\u00a0(for *.json and *.csv files)<\/p>\n<p>While generating static files is beneficial, there is still the extra step of having to import them into Couchbase Server through the available CLI tools. FakeIt also supports Couchbase Server and Sync Gateway as output destinations. We can generate 10,000 JSON documents from our users.yaml model, and output them to a bucket named ecommerce\u00a0on a Couchbase Server running locally using the command:<\/p>\n<pre class=\"lang:default decode:true \">fakeit couchbase \u2013server 127.0.0.1 \u2013bucket ecommerce \u2013count 10000 \u2013verbose models\/users.yaml\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5696 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog1-example5-compressor.gif\" alt=\"blog 1 example 5\" width=\"800\" height=\"463\" \/><\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>We&#8217;ve seen how we can represent a user&#8217;s JSON model using YAML to document and describe how a properties value should be generated. That single users.yaml\u00a0file can be output to the console, JSON files, Zip archive of JSON files, CSV files, and even directly into Couchbase. FakeIt is a fantastic tool to speed up your development and generate larger development datasets. You can save your FakeIt models as part of your codebase for easy repeatable datasets by any developer.<\/p>\n<p>FakeIt is a tool to ease development and testing of your Couchbase deployment. While it can generate large amounts of data, it is not a true load testing tool. There are CLI tools available for load testing and sizing such as <u><a href=\"https:\/\/docs.couchbase.com\/sdk-api\/couchbase-c-client-2.4.8\/md_doc_cbc-pillowfight.html\" target=\"_blank\" rel=\"noopener noreferrer\">cbc-pillowfight<\/a><\/u>\u00a0and <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/cli\/cbworkloadgen-tool.html\" target=\"_blank\" rel=\"noopener noreferrer\">cbworkloadgen<\/a><\/u><\/p>\n<h4><strong>Up Next<\/strong><\/h4>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-shared-data-dependencies\/\">FakeIt Series 2 of 5: Shared Data and Dependencies<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\">FakeIt Series 3 of 5: Lean Models through Definitions<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-working-existing-data\/\">FakeIt Series 4 of 5: Working with Existing Data<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-5-5-rapid-mobile-development-sync-gateway\/\">FakeIt Series 5 of 5: Rapid Mobile Development w\/ Sync-Gateway<\/a><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2966 aligncenter\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/brand.devCommChampionLogo.champion.FINAL_-300x300.png\" alt=\"Couchbase Champion\" width=\"300\" height=\"300\" \/><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/community\/community-writers-program\/\"><em>This post is part of the Couchbase Community Writing Program<\/em><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are countless blog posts on data modeling, key and document patterns. All of these posts give a great introduction into how to structure and model your documents in Couchbase, but none of them tell you what to do next. In this blog series we are going to answer the question, what do you after you&#8217;ve defined your data model?<\/p>\n","protected":false},"author":53,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,1819],"tags":[1883,1884,1885],"ppma_author":[9026],"class_list":["post-2959","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-data-modeling","tag-data-modelling","tag-document-patterns","tag-fakeit"],"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>FakeIt Series 1 of 5: Generating Fake Data - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"This article focuses on how we can represent a user&#039;s JSON model using YAML to document and describe how a properties value should be generated.\" \/>\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\/fakeit-series-generating-fake-data\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FakeIt Series 1 of 5: Generating Fake Data\" \/>\n<meta property=\"og:description\" content=\"This article focuses on how we can represent a user&#039;s JSON model using YAML to document and describe how a properties value should be generated.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-14T21:35:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-19T10:21:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg\" \/>\n<meta name=\"author\" content=\"Laura Czajkowski, Developer Community Manager, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Laura Czajkowski, Developer Community Manager, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\"},\"author\":{\"name\":\"Laura Czajkowski, Developer Community Manager, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220\"},\"headline\":\"FakeIt Series 1 of 5: Generating Fake Data\",\"datePublished\":\"2017-03-14T21:35:15+00:00\",\"dateModified\":\"2023-06-19T10:21:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\"},\"wordCount\":1101,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"data modelling\",\"document patterns\",\"fakeit\"],\"articleSection\":[\"Couchbase Server\",\"Data Modeling\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\",\"name\":\"FakeIt Series 1 of 5: Generating Fake Data - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-03-14T21:35:15+00:00\",\"dateModified\":\"2023-06-19T10:21:50+00:00\",\"description\":\"This article focuses on how we can represent a user's JSON model using YAML to document and describe how a properties value should be generated.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#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\/fakeit-series-generating-fake-data\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FakeIt Series 1 of 5: Generating Fake Data\"}]},{\"@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\/5f1a0ece4e644bc8c037686fbc8f3220\",\"name\":\"Laura Czajkowski, Developer Community Manager, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9deb07d5daaa00220534c31768bc4409\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g\",\"caption\":\"Laura Czajkowski, Developer Community Manager, Couchbase\"},\"description\":\"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/laura-czajkowski\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"FakeIt Series 1 of 5: Generating Fake Data - The Couchbase Blog","description":"This article focuses on how we can represent a user's JSON model using YAML to document and describe how a properties value should be generated.","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\/fakeit-series-generating-fake-data\/","og_locale":"en_US","og_type":"article","og_title":"FakeIt Series 1 of 5: Generating Fake Data","og_description":"This article focuses on how we can represent a user's JSON model using YAML to document and describe how a properties value should be generated.","og_url":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-03-14T21:35:15+00:00","article_modified_time":"2023-06-19T10:21:50+00:00","og_image":[{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg","type":"","width":"","height":""}],"author":"Laura Czajkowski, Developer Community Manager, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Laura Czajkowski, Developer Community Manager, Couchbase","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/"},"author":{"name":"Laura Czajkowski, Developer Community Manager, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220"},"headline":"FakeIt Series 1 of 5: Generating Fake Data","datePublished":"2017-03-14T21:35:15+00:00","dateModified":"2023-06-19T10:21:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/"},"wordCount":1101,"commentCount":4,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["data modelling","document patterns","fakeit"],"articleSection":["Couchbase Server","Data Modeling"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/","url":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/","name":"FakeIt Series 1 of 5: Generating Fake Data - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2017-03-14T21:35:15+00:00","dateModified":"2023-06-19T10:21:50+00:00","description":"This article focuses on how we can represent a user's JSON model using YAML to document and describe how a properties value should be generated.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/#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\/fakeit-series-generating-fake-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FakeIt Series 1 of 5: Generating Fake Data"}]},{"@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\/5f1a0ece4e644bc8c037686fbc8f3220","name":"Laura Czajkowski, Developer Community Manager, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9deb07d5daaa00220534c31768bc4409","url":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","caption":"Laura Czajkowski, Developer Community Manager, Couchbase"},"description":"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter.","url":"https:\/\/www.couchbase.com\/blog\/author\/laura-czajkowski\/"}]}},"authors":[{"term_id":9026,"user_id":53,"is_guest":0,"slug":"laura-czajkowski","display_name":"Laura Czajkowski, Developer Community Manager, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","author_category":"","last_name":"Czajkowski","first_name":"Laura","job_title":"","user_url":"","description":"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2959","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\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2959"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2959\/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=2959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2959"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}