首页
\
问答
\
Azure DocumentDB与MongoDB协议Spark集成(Azure DocumentDB with MongoDB Protocol Spark integration)
Azure DocumentDB与MongoDB协议Spark集成(Azure DocumentDB with MongoDB Protocol Spark integration)
我想使用DocumentDB,但PySpark没有连接器。 看起来DocumentDB也支持这里提到的MongoDB协议 ,这意味着所有现有的MongoDB驱动程序都应该可以工作。 由于MongoDB有PySpark连接器 ,我想尝试一下。
df = spark.read.format("com.mongodb.spark.sql.DefaultSource").load()
这会引发错误。
com.mongodb.MongoCommandException: Command failed with error 115: ''$sample' is not supported' on server example.documents.azure.com:10250. The full response is { "_t" : "OKMongoResponse", "ok" : 0, "code" : 115, "errmsg" : "'$sample' is not supported", "$err" : "'$sample' is not supported" }
看起来DocumentDB MongoDB API不支持所有MongoDB功能,但我找不到任何文档。 还是我错过了别的什么?
I want to use DocumentDB but there is no connector for PySpark. Looks like DocumentDB also supports MongoDB Protocol as mentioned here, which means all existing MongoDB drivers should work. Since there is PySpark connector for MongoDB, I wanted to try this out.
df = spark.read.format("com.mongodb.spark.sql.DefaultSource").load()
This throws error.
com.mongodb.MongoCommandException: Command failed with error 115: ''$sample' is not supported' on server example.documents.azure.com:10250. The full response is { "_t" : "OKMongoResponse", "ok" : 0, "code" : 115, "errmsg" : "'$sample' is not supported", "$err" : "'$sample' is not supported" }
It looks like DocumentDB MongoDB API doesn't support all MongoDB features, but I can't find any documentation about. Or am I missing something else?
原文:https://stackoverflow.com/questions/43591974
更新时间:2022-11-14 06:11
最满意答案
你检查了细胞的格式吗?
Have you checked the format of the cell?
相关问答
更多-
如何将Excel中的公式复制到包含VBA数据的最后一个单元格(How to copy down formula in Excel to last cell with data in VBA)[2023-11-12]
Dim ws As Worksheet Set ws = WorkSheets("FedEx Air Ops Workbench Report") lastRow = ws.Cells(ws.Rows.Count, "G").End(xlUp).Row Debug.Print lastRow ws.Range("G4").FormulaR1C1 = "=VLOOKUP(RC[-2],BUTTONS!R2C11:R6C12,2,FALSE)" ws.Range("G4").AutoFill Destinati ... -
这应该工作 Sub Foo() Dim i As Long, iMatches As Long Dim aTokens() As String: aTokens = Split("reply,response", ",") For Each cell In Sheets("data").Range("D:D") If (Len(cell.Value) = 0) Then Exit For For i = 0 To UBound(aTokens) If InSt ...
-
将数据从Word复制到Excel单元格。(Copy data from Word to Excel Cell. Then trigger formula in adjacent cell. How?)[2023-10-15]
你检查了细胞的格式吗? Have you checked the format of the cell? -
尝试下面的代码 Sub test() lastrow = Range("B" & Rows.Count).End(xlUp).Row For i = 2 To lastrow If Cells(i, 1) = "" Then If Cells(i - 1, 1).Interior.ColorIndex > 0 Then Cells(i, 1) = Cells(i - 1, 1) Cells ...
-
尝试将一些代码更改为如下所示,并使GetExcelTitles调用您的Paste Sub,而不是相反。 Dim rng as Range For Each xlWkBk In ObjXL.Workbooks If xlWkBk.Name = "130611 Figure Lists.xlsx" Then For each xlWkBk.Sheets("Figuresonly").Range("C1", "C250") rng.Select rng.Copy Call TitleDrop Ne ...
-
如何访问Excel单元格中的所有数据?(How do I access all the data in an excel cell? I need to import into MATLAB)[2023-09-26]
默认情况下, xlsread日期/时间字段检索为根据当前系统区域设置格式化的字符串。 问题是,在大多数情况下,不会显示小部分秒数,导入文件时会丢失。 在xlsread的文档末尾有一个注释,解释了这一点: xlsread格式化日期作为字符串(例如'10 / xlsread ')导入,但在basic模式和没有Excel for Windows的计算机上除外。 幸运的是 ,您可以在xlsread传递自定义处理函数以获取原始未格式化的值(仅在安装了Excel软件的Windows计算机上支持此功能)。 正如@RonR ... -
Excel单元格中的HTML数据。(HTML data in Excel cell. Excel changing values, causing invalid import into database)[2023-07-07]
尝试将HTML代码放在一行中,没有中断。 例如:Test 我使用上面简单的HTML片段进行了快速测试。 在A列中,我将代码放在换行符中。 在B列中,我没有中断代码。 然后我复制单元格A1并将其粘贴到记事本中,然后复制B1并将其粘贴到记事本中。 你会看到第一个粘贴(A1)有双引号。 第二种糊剂(B1)没有双引号。 Try putting the HTML code in a single line ...如何使用Excel宏将Word的一段文本复制到Excel?(How can I copy one section of text from Word to Excel using an Excel macro?)[2023-05-29]
更新以显示搜索文本,然后选择相对于其位置的内容: Sub FindAndCopyNext() Dim TextToFind As String, TheContent As String Dim rng As Word.Range TextToFind = "wibble" 'the text you're looking for to ' locate the other content Set rng = wdAp ...从Word文件中搜索文本并显示相邻的单元格(Search column for text from a Word file and display the cell adjacent)[2023-10-24]
你应该使用一个数组并在其上循环: Sub test_Mugiwara_Luffy() Dim PersonS(), _ i As Long, _ NameS() As String ReDim PersonS(1 To 85, 1 To 2) PersonS(1, 1) = "Joe A" PersonS(2, 1) = "Jack B" PersonS(3, 1) = "John C" '.... For i = LBound(PersonS, 1) To UBound(Perso ...您可以使用以下公式执行此操作: =IF(C1="",INDEX($A$2:$A$20,COUNTBLANK($C$1:C1)),"") You can do it with a formula: =IF(C1="",INDEX($A$2:$A$20,COUNTBLANK($C$1:C1)),"")相关文章
更多- Param's Blog: Nutch 1.3 and Solr Integration
- 微软Azure提供Hadoop集群管理和部署
- solr mongoDB 对比
- Mongodb与spring集成(1)------配置
- 深入浅出MongoDB(一):认识MongoDB
- MongoDB学习(一):MongoDB 环境的搭建
- MongoDB学习(三):MongoDB Shell的使用
- MongoDB集成Hadoop进行统计计算
- 对比下HBase, Memcached, MongoDB, Redis和Solr
- Mongodb与spring集成(2)------实体映射
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)