久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='wMT5f'></small><noframes id='wMT5f'>

      • <bdo id='wMT5f'></bdo><ul id='wMT5f'></ul>

    1. <i id='wMT5f'><tr id='wMT5f'><dt id='wMT5f'><q id='wMT5f'><span id='wMT5f'><b id='wMT5f'><form id='wMT5f'><ins id='wMT5f'></ins><ul id='wMT5f'></ul><sub id='wMT5f'></sub></form><legend id='wMT5f'></legend><bdo id='wMT5f'><pre id='wMT5f'><center id='wMT5f'></center></pre></bdo></b><th id='wMT5f'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wMT5f'><tfoot id='wMT5f'></tfoot><dl id='wMT5f'><fieldset id='wMT5f'></fieldset></dl></div>
      <legend id='wMT5f'><style id='wMT5f'><dir id='wMT5f'><q id='wMT5f'></q></dir></style></legend>

    2. <tfoot id='wMT5f'></tfoot>

        如何從excel導入documentDB中的批量數據?

        How to import bulk data in documentDB from excel?(如何從excel導入documentDB中的批量數據?)
          1. <i id='86owf'><tr id='86owf'><dt id='86owf'><q id='86owf'><span id='86owf'><b id='86owf'><form id='86owf'><ins id='86owf'></ins><ul id='86owf'></ul><sub id='86owf'></sub></form><legend id='86owf'></legend><bdo id='86owf'><pre id='86owf'><center id='86owf'></center></pre></bdo></b><th id='86owf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='86owf'><tfoot id='86owf'></tfoot><dl id='86owf'><fieldset id='86owf'></fieldset></dl></div>
            <tfoot id='86owf'></tfoot>
                <tbody id='86owf'></tbody>
            • <legend id='86owf'><style id='86owf'><dir id='86owf'><q id='86owf'></q></dir></style></legend>
                <bdo id='86owf'></bdo><ul id='86owf'></ul>

                  <small id='86owf'></small><noframes id='86owf'>

                  本文介紹了如何從excel導入documentDB中的批量數據?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我已經瀏覽了一天關于如何從excel文件在documentDB中插入批量數據,但我沒有得到任何信息.

                  I have surfed for a day about how to insert bulk data in documentDB from excel file, but I didn't get any informaion.

                  我可以從excel文件中讀取數據并在documentDB中一一插入

                  I can able to read data from excel file and insert one by one in documentDB

                  Service service = new Service();
                      foreach(data in exceldata) //exceldata contains set of rows
                      {
                      var student = new Student();
                      student.id= "";
                      student.name = data.name;
                      student.age = data.age;
                      student.class = data.class;
                      student.id = service.savetoDocumentDB(collectionLink,student); //collectionlink is a string stored in web.config
                      students.add(student);
                      }
                  
                  Class Service
                  {
                   public async Task<string> AddDocument(string collectionLink, Student data)
                          {
                              this.DeserializePayload(data);
                              var result = await Client.CreateDocumentAsync(collectionLink, data);
                              return result.Resource.Id;
                          }
                  }
                  

                  我可以在一個實例中插入所有記錄嗎?

                  Can I insert all records at one instance?

                  任何幫助將不勝感激.

                  推薦答案

                  更新(4/8/15): DocumentDB剛剛發布了一個數據導入工具,支持JSON文件、MongoDB、SQL Server, 和 CSV 文件.你可以在這里找到它:http://www.microsoft.com/en-us/download/details.aspx?id=46436

                  Update (4/8/15): DocumentDB just released a data import tool, which supports JSON files, MongoDB, SQL Server, and CSV files. You can find it here: http://www.microsoft.com/en-us/download/details.aspx?id=46436

                  原答案:

                  DocumentDB 尚不支持從 excel 文件批量導入...但是,您可以利用 DocumentDB 的存儲過程使批量導入更加友好!

                  DocumentDB doesn't support bulk importing from excel files just yet... However, you can leverage DocumentDB's store procedures to make bulk import a bit more friendly!

                  查看 Ryan 來自 MSDN 的示例:

                  /** 
                  * This script called as stored procedure to import lots of documents in one batch. 
                  * The script sets response body to the number of docs imported and is called multiple times  
                  * by the client until total number of docs desired by the client is imported. 
                  * @param  {Object[]} docs - Array of documents to import. 
                  */ 
                  function bulkImport(docs) { 
                      var collection = getContext().getCollection(); 
                      var collectionLink = collection.getSelfLink(); 
                  
                      // The count of imported docs, also used as current doc index. 
                      var count = 0; 
                  
                      // Validate input. 
                      if (!docs) throw new Error("The array is undefined or null."); 
                  
                      var docsLength = docs.length; 
                      if (docsLength == 0) { 
                          getContext().getResponse().setBody(0); 
                      } 
                  
                      // Call the CRUD API to create a document. 
                      tryCreate(docs[count], callback); 
                  
                      // Note that there are 2 exit conditions: 
                      // 1) The createDocument request was not accepted.  
                      //    In this case the callback will not be called, we just call setBody and we are done. 
                      // 2) The callback was called docs.length times. 
                      //    In this case all documents were created and we don't need to call tryCreate anymore. Just call setBody and we are done. 
                      function tryCreate(doc, callback) { 
                          var isAccepted = collection.createDocument(collectionLink, doc, callback); 
                  
                          // If the request was accepted, callback will be called. 
                          // Otherwise report current count back to the client,  
                          // which will call the script again with remaining set of docs. 
                          // This condition will happen when this stored procedure has been running too long 
                          // and is about to get cancelled by the server. This will allow the calling client 
                          // to resume this batch from the point we got to before isAccepted was set to false 
                          if (!isAccepted) getContext().getResponse().setBody(count); 
                      } 
                  
                      // This is called when collection.createDocument is done and the document has been persisted. 
                      function callback(err, doc, options) { 
                          if (err) throw err; 
                  
                          // One more document has been inserted, increment the count. 
                          count++; 
                  
                          if (count >= docsLength) { 
                              // If we have created all documents, we are done. Just set the response. 
                              getContext().getResponse().setBody(count); 
                          } else { 
                              // Create next document. 
                              tryCreate(docs[count], callback); 
                          } 
                      } 
                  } 
                  

                  您可以在此處找到有關 DocumentDB 數據庫端編程(存儲過程、觸發器和 UDF)的參考文檔:http://azure.microsoft.com/en-us/documentation/articles/documentdb-programming/

                  You can find reference documentation regarding DocumentDB database-side programming (stored procedures, triggers, and UDFs) here: http://azure.microsoft.com/en-us/documentation/articles/documentdb-programming/

                  這篇關于如何從excel導入documentDB中的批量數據?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                1. <legend id='obQrt'><style id='obQrt'><dir id='obQrt'><q id='obQrt'></q></dir></style></legend>
                  • <tfoot id='obQrt'></tfoot>
                      <tbody id='obQrt'></tbody>
                    <i id='obQrt'><tr id='obQrt'><dt id='obQrt'><q id='obQrt'><span id='obQrt'><b id='obQrt'><form id='obQrt'><ins id='obQrt'></ins><ul id='obQrt'></ul><sub id='obQrt'></sub></form><legend id='obQrt'></legend><bdo id='obQrt'><pre id='obQrt'><center id='obQrt'></center></pre></bdo></b><th id='obQrt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='obQrt'><tfoot id='obQrt'></tfoot><dl id='obQrt'><fieldset id='obQrt'></fieldset></dl></div>

                      <small id='obQrt'></small><noframes id='obQrt'>

                            <bdo id='obQrt'></bdo><ul id='obQrt'></ul>
                          • 主站蜘蛛池模板: 欧美日韩亚洲在线 | 成人国产一区二区三区精品麻豆 | 久久精品97| 日韩久久综合网 | 又黑又粗又长的欧美一区 | 羞羞免费网站 | 久久久久一区 | 91夜色在线观看 | 国产视频三区 | 欧美三级三级三级爽爽爽 | 成人av免费 | 一区二区三区在线 | 欧美 日韩 综合 | 欧美一卡二卡在线 | 日韩精品一二三 | 国产精品久久久久久亚洲调教 | 亚洲精品视频在线观看免费 | 欧美天堂在线 | 99久久久久久 | 久久久久久999 | 久久高清精品 | 国产一区二区三区在线看 | 国产成人精品免费 | 亚洲永久入口 | 国产精品一级 | 激情欧美一区二区三区中文字幕 | 99精品视频一区二区三区 | 亚洲一区三区在线观看 | 国产精品永久久久久 | 欧美a视频| 欧美性生活网 | 九九久久免费视频 | 国产精品资源在线 | 欧美视频免费在线 | 色在线看 | 亚洲 自拍 另类 欧美 丝袜 | 久久在线看 | 亚洲国产精品一区二区三区 | 超碰97免费 | 久久久久一区 | 精品免费视频一区二区 |