Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cosmos DB Data Plane/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Jupyter Notebook
.ipynb_checkpoints/

# IPython
profile_default/
ipython_config.py
1,070 changes: 1,070 additions & 0 deletions Cosmos DB Data Plane/CosmosDB - Python Tutorial.ipynb

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions Cosmos DB Data Plane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Learn the Python SDK for Cosmos DB with a Jupyter Notebook

As you probably know, [Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/) is a globally distributed, multi-model database service in Azure that supports document, key-value, wide-column, and graph databases.

Cosmos DB includes support for multiple Software Development Kits for programming languages such as Python. Multiple resources already exist that help to learn to use the Python SDK:

* This repository
* [Cosmos DB reference guide for the Python SDK](https://docs.microsoft.com/en-us/python/api/azure-cosmos/?view=azure-python)
* [Cosmos DB CRUD tests with the Python SDK](https://github.com/Azure/azure-cosmos-python/blob/master/test/crud_tests.py)

As opposed to documentation or code samples, Jupyter Notebooks offer a very interesting combination of rich text for explanations and pieces of code that can be executed independently from each other, which makes it ideal to learn a new technology.

Hence this repository containing a notebook that goes over the basic (and not so basic) concepts of using Cosmos DB with its Python SDK for the SQL API.

You will find a requirements.txt file in this repository including all required dependencies, you can install them using the pip command `pip install -r requirements.txt`
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,438.09","name":"Gilliam Greer","company":"DYNO","email":"gilliamgreer@dyno.com","phone":"+1 (885) 466-3478","source":"other","address":"232 Dare Court, Grenelefe, Iowa, 6159","registered":"2016-04-05T01:47:25 +04:00","id":"09d2bb28e9c54bc581492d542789f2ad"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$1,996.17","name":"Hansen Wiley","company":"PETICULAR","email":"hansenwiley@peticular.com","phone":"+1 (881) 467-2529","source":"direct-mail","address":"759 Branton Street, Muse, Vermont, 9568","registered":"2014-10-03T09:19:05 +04:00","id":"0a278402b6f64d988b34103eef2f9d80"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,701.90","name":"Benton Cooley","company":"QOT","email":"bentoncooley@qot.com","phone":"+1 (854) 512-3805","source":"word-of-mouth","address":"851 Locust Street, Richville, Washington, 599","registered":"2014-06-01T01:52:47 +04:00","id":"1240d84bd5f44074b36bd1977bc9062c"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,865.36","name":"Trina Parrish","company":"MAXIMIND","email":"trinaparrish@maximind.com","phone":"+1 (940) 533-2438","source":"other","address":"886 Etna Street, Springville, Maryland, 2731","registered":"2015-03-22T12:08:27 +04:00","id":"1b5c9eca01504e8e8ba5d0e5a4e09c53"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$1,444.96","name":"Lowe Sexton","company":"AQUOAVO","email":"lowesexton@aquoavo.com","phone":"+1 (916) 429-3598","source":"other","address":"969 Dwight Street, Chaparrito, New Jersey, 2267","registered":"2014-01-19T03:48:19 +05:00","id":"1de56f1332e246808ceda831ac92022f"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,629.57","name":"Tillman Morales","company":"MICRONAUT","email":"tillmanmorales@micronaut.com","phone":"+1 (911) 470-2192","source":"other","address":"718 Alabama Avenue, Waterview, Northern Mariana Islands, 8635","registered":"2014-01-20T07:20:59 +05:00","id":"23a2fad0b43548d4b0229b0392f399fd"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,873.90","name":"Alison Russo","company":"UPDAT","email":"alisonrusso@updat.com","phone":"+1 (929) 477-2827","source":"online-promotion","address":"387 Dahlgreen Place, Ahwahnee, Oregon, 7251","registered":"2014-03-18T06:15:03 +04:00","id":"3b2a5b2bf3ca44d3956c87a26980aa47"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$3,985.15","name":"Ruby Floyd","company":"CORECOM","email":"rubyfloyd@corecom.com","phone":"+1 (811) 448-2217","source":"other","address":"658 Havens Place, Santel, Maine, 4288","registered":"2014-10-16T06:12:25 +04:00","id":"3f97655010ca469b96436b8813e5f37e"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,906.35","name":"Donna Pacheco","company":"MOTOVATE","email":"donnapacheco@motovate.com","phone":"+1 (967) 484-3423","source":"online-promotion","address":"360 Chase Court, Onton, Palau, 1276","registered":"2015-12-29T02:44:31 +05:00","id":"4b69cfe010fd4e84bfc2228e1188cbd4"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,665.73","name":"Bettye Anderson","company":"COMVEY","email":"bettyeanderson@comvey.com","phone":"+1 (976) 468-2306","source":"other","address":"424 Prospect Avenue, Lodoga, Indiana, 7886","registered":"2016-11-25T11:40:58 +05:00","id":"4e5818904600431e8ff077d408547246"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,458.67","name":"Chapman Castaneda","company":"XUMONK","email":"chapmancastaneda@xumonk.com","phone":"+1 (976) 469-3134","source":"other","address":"373 Bergen Avenue, Lowgap, Connecticut, 5137","registered":"2015-05-26T12:41:59 +04:00","id":"4ef72aba2a00466090b7f6b3888fd1d2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,133.53","name":"Brittney Mcmillan","company":"LUNCHPAD","email":"brittneymcmillan@lunchpad.com","phone":"+1 (857) 552-3918","source":"other","address":"197 Mill Avenue, Bluetown, Texas, 3330","registered":"2017-02-23T06:33:44 +05:00","id":"5b913f3a23aa4f21b5775d18b5d68abd"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$1,249.11","name":"Barber Fernandez","company":"EXOTECHNO","email":"barberfernandez@exotechno.com","phone":"+1 (903) 423-3100","source":"retail-location","address":"750 Dewey Place, Templeton, Wyoming, 2883","registered":"2014-08-31T06:27:45 +04:00","id":"5bc394024b624225bd19bea3269a5a68"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,490.53","name":"Warren Holman","company":"MULTIFLEX","email":"warrenholman@multiflex.com","phone":"+1 (913) 568-2959","source":"word-of-mouth","address":"325 Debevoise Avenue, Morriston, Florida, 7301","registered":"2015-12-15T12:10:22 +05:00","id":"5c89c87d34e64f37a3c8fae3fb86d8fc"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,801.02","name":"Lakisha Porter","company":"AEORA","email":"lakishaporter@aeora.com","phone":"+1 (844) 581-2098","source":"direct-mail","address":"711 Gerritsen Avenue, Albany, Virgin Islands, 2768","registered":"2015-11-16T05:36:02 +05:00","id":"67b463b031b24c84b0fbb5889349cdc0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,782.97","name":"Hodge Best","company":"KYAGURU","email":"hodgebest@kyaguru.com","phone":"+1 (918) 402-2827","source":"word-of-mouth","address":"780 Gold Street, Basye, Puerto Rico, 6959","registered":"2014-05-03T12:01:54 +04:00","id":"69f9173b21a7416eb2d654ddc9e58afd"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,796.23","name":"Jeanine Higgins","company":"TECHMANIA","email":"jeaninehiggins@techmania.com","phone":"+1 (911) 515-3487","source":"other","address":"437 Lefferts Place, Driftwood, North Dakota, 6719","registered":"2014-07-08T08:25:51 +04:00","id":"6a4f0022f9d749889f099eef61316af6"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,256.58","name":"Lois Leon","company":"ENTROPIX","email":"loisleon@entropix.com","phone":"+1 (900) 417-2983","source":"other","address":"851 Amherst Street, Loveland, Hawaii, 3125","registered":"2015-03-29T08:49:39 +04:00","id":"6e98fb47d74048fa9ebf4a5be8775a05"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$3,453.46","name":"Laurel Leach","company":"BUZZOPIA","email":"laurelleach@buzzopia.com","phone":"+1 (925) 494-2640","source":"other","address":"739 Cox Place, Graball, Alabama, 6877","registered":"2017-02-01T08:05:56 +05:00","id":"6f07254615b74f39972a468c51db98a3"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,859.84","name":"Cotton Campbell","company":"JETSILK","email":"cottoncampbell@jetsilk.com","phone":"+1 (862) 454-3541","source":"word-of-mouth","address":"999 Stratford Road, Homestead, Nevada, 9252","registered":"2015-12-11T08:33:59 +05:00","id":"6f37c81981194575b5775e863d7c2de9"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$3,236.93","name":"Franks Sloan","company":"ACUMENTOR","email":"frankssloan@acumentor.com","phone":"+1 (924) 429-3892","source":"online-promotion","address":"993 Manhattan Court, Wiscon, Guam, 6383","registered":"2017-02-17T11:01:03 +05:00","id":"71e50777f02d4ead828871af8e0d8981"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,677.44","name":"Drake Garrison","company":"ZOARERE","email":"drakegarrison@zoarere.com","phone":"+1 (839) 417-2040","source":"direct-mail","address":"143 Frank Court, Floriston, Kansas, 8896","registered":"2016-03-08T05:42:58 +05:00","id":"73567f1c275a49b0ae191d3d71b90507"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,217.76","name":"Jeri Roach","company":"SAVVY","email":"jeriroach@savvy.com","phone":"+1 (868) 412-2190","source":"other","address":"435 Newel Street, Nescatunga, Louisiana, 6443","registered":"2015-08-01T02:30:11 +04:00","id":"7c0fb17e45764ac5aefaabfbf87c0f70"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,611.17","name":"Nona Hurst","company":"CHILLIUM","email":"nonahurst@chillium.com","phone":"+1 (843) 598-2245","source":"retail-location","address":"820 Ashland Place, Haena, Colorado, 5734","registered":"2014-07-08T11:40:40 +04:00","id":"84054508c93d40fc94d67d6e844c506f"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,030.99","name":"Gay Jenkins","company":"FLOTONIC","email":"gayjenkins@flotonic.com","phone":"+1 (899) 424-2583","source":"word-of-mouth","address":"271 Sapphire Street, Suitland, New Hampshire, 3202","registered":"2014-12-10T09:46:28 +05:00","id":"8913563905b844bda309fbb0a6c4dadd"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,135.83","name":"Sylvia Chan","company":"PORTALINE","email":"sylviachan@portaline.com","phone":"+1 (993) 505-3884","source":"direct-mail","address":"998 Columbia Place, Eagletown, South Carolina, 8828","registered":"2014-01-31T10:28:45 +05:00","id":"8e683a069a264056b8d3cd823eb0dbe2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,890.16","name":"Whitney Townsend","company":"VIXO","email":"whitneytownsend@vixo.com","phone":"+1 (955) 443-3000","source":"direct-mail","address":"819 Dean Street, Sehili, Pennsylvania, 8800","registered":"2015-04-02T02:48:13 +04:00","id":"9385de0d24d7404d87f767039c0bdc80"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,941.80","name":"Connie Foster","company":"COMVOY","email":"conniefoster@comvoy.com","phone":"+1 (898) 525-3194","source":"other","address":"516 Hutchinson Court, Takilma, Massachusetts, 6212","registered":"2014-10-31T10:46:10 +04:00","id":"9690cd9d6f6e4fa9a47729e5a91eecb2"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,067.24","name":"Merritt Hood","company":"ISOTRACK","email":"merritthood@isotrack.com","phone":"+1 (950) 500-2091","source":"word-of-mouth","address":"897 Turnbull Avenue, Cleary, Michigan, 1303","registered":"2017-01-17T10:26:35 +05:00","id":"97a2f28923c442d780af683f8dbd660b"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,011.56","name":"Monica Finley","company":"EVENTEX","email":"monicafinley@eventex.com","phone":"+1 (898) 412-2487","source":"word-of-mouth","address":"182 Varanda Place, Garberville, Arkansas, 8805","registered":"2014-12-10T06:30:16 +05:00","id":"9a8cd39addf7489aab6cdba3a34fe769"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,509.95","name":"Latasha James","company":"CORPORANA","email":"latashajames@corporana.com","phone":"+1 (814) 582-2256","source":"word-of-mouth","address":"220 Pilling Street, Nicut, Mississippi, 5886","registered":"2016-08-05T05:42:52 +04:00","id":"a26d5fcb81634238bc3d92811a72d7e8"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$3,152.67","name":"Haley Maldonado","company":"QUOTEZART","email":"haleymaldonado@quotezart.com","phone":"+1 (881) 490-2026","source":"other","address":"661 Sackett Street, Dragoon, Kentucky, 9417","registered":"2016-07-28T12:53:43 +04:00","id":"a2e8c5c15d2141b28e95d91ed792f688"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,121.92","name":"Mercado Mcdaniel","company":"COWTOWN","email":"mercadomcdaniel@cowtown.com","phone":"+1 (902) 535-3501","source":"word-of-mouth","address":"889 Desmond Court, Elwood, West Virginia, 703","registered":"2015-02-20T08:11:01 +05:00","id":"a551e5c83cb144a583719a65f96ae472"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,242.22","name":"Lilly Copeland","company":"DUFLEX","email":"lillycopeland@duflex.com","phone":"+1 (909) 545-2879","source":"direct-mail","address":"128 Essex Street, Hollins, Delaware, 4193","registered":"2016-09-20T02:48:25 +04:00","id":"ba53a3f3ed4a469a8237d72afdf0a1c3"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,952.74","name":"Leonard Atkinson","company":"DIGINETIC","email":"leonardatkinson@diginetic.com","phone":"+1 (941) 493-2318","source":"word-of-mouth","address":"227 Moultrie Street, Cloverdale, New Mexico, 3954","registered":"2014-09-23T10:07:41 +04:00","id":"bb40b726049e473fbc29fa4a477fcb97"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$3,962.59","name":"Araceli Franks","company":"AUTOGRATE","email":"aracelifranks@autograte.com","phone":"+1 (838) 428-2232","source":"retail-location","address":"699 King Street, Zeba, California, 8140","registered":"2015-10-08T01:41:43 +04:00","id":"bb97b63d39b24df68f8b401b6fe56856"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,960.52","name":"Lynne Perez","company":"MACRONAUT","email":"lynneperez@macronaut.com","phone":"+1 (819) 543-2626","source":"other","address":"821 Crystal Street, Edgewater, Nebraska, 5764","registered":"2015-10-30T06:57:42 +04:00","id":"bd80b9d085d54639af2f10e3c262e35e"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,796.28","name":"Nina Holden","company":"RONELON","email":"ninaholden@ronelon.com","phone":"+1 (946) 581-2673","source":"word-of-mouth","address":"327 Hinsdale Street, Roy, Alaska, 807","registered":"2015-03-05T02:11:07 +05:00","id":"c1cebfd27dfd4559aad601feeed50155"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$3,566.99","name":"Rice Cunningham","company":"QABOOS","email":"ricecunningham@qaboos.com","phone":"+1 (877) 577-2261","source":"retail-location","address":"566 Kossuth Place, Lemoyne, Arizona, 6294","registered":"2015-04-21T11:59:34 +04:00","id":"c28462cc181b4d38a27712b905346052"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,533.98","name":"Claudette Guzman","company":"OVATION","email":"claudetteguzman@ovation.com","phone":"+1 (846) 555-3511","source":"other","address":"177 Moore Street, Greenock, South Dakota, 4955","registered":"2015-10-17T10:10:14 +04:00","id":"c64f1d379f7a4a079ade4c8a88e957fa"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,620.45","name":"Doreen Pope","company":"RENOVIZE","email":"doreenpope@renovize.com","phone":"+1 (963) 523-3749","source":"retail-location","address":"798 Irwin Street, Avalon, District Of Columbia, 9258","registered":"2015-04-05T08:40:04 +04:00","id":"ca4d641a69594dbbaaef53bc91677147"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,153.84","name":"Freeman Miller","company":"EXOSPACE","email":"freemanmiller@exospace.com","phone":"+1 (952) 595-3375","source":"other","address":"652 Cadman Plaza, Cade, Federated States Of Micronesia, 4704","registered":"2014-10-29T09:53:02 +04:00","id":"cc0e857a1f45435dba2780bc559d82e7"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$3,290.57","name":"Ruiz Hines","company":"MALATHION","email":"ruizhines@malathion.com","phone":"+1 (883) 592-3354","source":"word-of-mouth","address":"485 Forest Place, Statenville, Oklahoma, 9884","registered":"2015-02-15T08:32:31 +05:00","id":"d4b6835c7fc2496680fc678a900ab734"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$1,600.79","name":"Lizzie Reed","company":"GEEKULAR","email":"lizziereed@geekular.com","phone":"+1 (909) 548-3415","source":"direct-mail","address":"570 Ruby Street, Spokane, Idaho, 9025","registered":"2014-10-30T05:49:33 +04:00","id":"e53072057d314bc9b36c89a8350048f3"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,474.62","name":"Rodgers Ray","company":"DENTREX","email":"rodgersray@dentrex.com","phone":"+1 (904) 543-2469","source":"other","address":"515 Barwell Terrace, Defiance, Tennessee, 6439","registered":"2014-10-16T06:49:04 +04:00","id":"e913fe543490432f871bc42019663518"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$2,331.23","name":"Helen Mccarty","company":"FIBEROX","email":"helenmccarty@fiberox.com","phone":"+1 (841) 449-3503","source":"word-of-mouth","address":"881 Bush Street, Belva, Minnesota, 5351","registered":"2015-02-15T11:56:23 +05:00","id":"ed0a92c6f1954216871a9da43c5ddd8d"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$1,098.31","name":"Cathryn Conway","company":"SOFTMICRO","email":"cathrynconway@softmicro.com","phone":"+1 (827) 559-3874","source":"direct-mail","address":"124 Tapscott Street, Coldiron, Utah, 9486","registered":"2015-11-17T03:24:27 +05:00","id":"ede407769a8b44cdb2bdcd4f4e2065b8"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":true,"balance":"$1,926.73","name":"Vazquez Vaughn","company":"VURBO","email":"vazquezvaughn@vurbo.com","phone":"+1 (872) 586-2164","source":"direct-mail","address":"885 Strong Place, Cassel, Montana, 2069","registered":"2015-03-20T07:21:47 +04:00","id":"ef0365fb40c04bb6a3ffc4bc77c905fd"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,002.69","name":"Walker Daugherty","company":"PROWASTE","email":"walkerdaugherty@prowaste.com","phone":"+1 (990) 533-3904","source":"word-of-mouth","address":"521 Bassett Avenue, Wikieup, Missouri, 5422","registered":"2015-02-06T05:32:32 +05:00","id":"f1ca3044f17149f3bc61f7b9c78a26df"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"isActive":false,"balance":"$2,603.51","name":"Dorothy Romero","company":"EXOSTREAM","email":"dorothyromero@exostream.com","phone":"+1 (978) 569-2635","source":"word-of-mouth","address":"167 Nassau Street, Tuskahoma, Illinois, 5998","registered":"2015-06-16T08:54:17 +04:00","id":"f75f949ea8de466a9ef2bdb7ce065ac8"}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Cosmos DB Data Plane/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
azure
azure-cosmos
17 changes: 17 additions & 0 deletions Cosmos DB Data Plane/storedproc/CreateSampleCustomer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function createSampleCustomer(itemToCreate) {
var context = getContext();
var collection = context.getCollection();
// var newID = function () {
// return Math.random().toString(36).substr(2, 12);
// };
console.log("hello world!")
// console.log(newID());
var accepted = collection.createDocument(collection.getSelfLink(),
itemToCreate,
function (err, documentCreated) {
if (err) throw new Error('Error' + err.message);
context.getResponse().setBody(documentCreated.id);
}
);
if (!accepted) return;
}
Loading