简体   繁体   English

filepath@data 数据类型的 datajoint-matlab 实现

[英]datajoint-matlab implementation of filepath@data datatype

For datajoint-matlab, #327 seems to indicate that File external storage (#143, PR #197) should be implemented in the current version.对于 datajoint-matlab,#327 似乎表明文件外部存储(#143,PR #197)应该在当前版本中实现。 I can create a table with the datatype filepath@data, after defining the store 'data', but I get an error on insert.在定义存储“数据”后,我可以创建一个数据类型为 filepath@data 的表,但插入时出现错误。

Error using dj.Relvar/insert/makePlaceholder (line 244)
The field `fref` with datatype `filepath@data` is not yet supported.

Error in dj.Relvar/insert (line 334)
                    [v, placeholder] = makePlaceholder(i,
                    tuple.(header.attributes(i).name));

Is this still not implemented, or is the error-checking here just stopping me from using it?这仍然没有实现,还是这里的错误检查只是阻止我使用它? Happy to provide more details on the test if needed.如果需要,很高兴提供有关测试的更多详细信息。

Maintainer for DataJoint here. DataJoint 的维护者在这里。 Looks like there is a bit of confusion so let's see if I can help to bring some clarity.看起来有点混乱,所以让我们看看我是否可以帮助澄清一下。 Hope to use this discussion as a resource to improve the documentation.希望将此讨论用作改进文档的资源。

DataJoint provides a few DataJoint-only datatypes . DataJoint 提供了一些DataJoint-only 数据类型 Of these types, we identify the ones associated with external storage by embedding an @ symbol.在这些类型中,我们通过嵌入@符号来识别与外部存储相关联的类型。 We classify each part of the type as <datatype>@<store> .我们将类型的每个部分分类为<datatype>@<store> Essentially with these types, information (ie datatype ) is stored remotely in an object store (ie a store ) with proper reference links within the relational database and client configuration for access.本质上,对于这些类型,信息(即datatype )远程存储在 object 存储(即store )中,并在关系数据库和客户端配置中具有适当的参考链接以供访问。

For datatype , there are currently 3 options:对于datatype ,目前有 3 个选项:

  • blob : Equivalent to a blob type but for external stores. blob :等效于blob类型,但用于外部存储。 Currently, this type is supported both in datajoint-python and most recently in datajoint-matlab .目前,在datajoint-python和最近的datajoint-matlab中都支持这种类型。
  • attach : A special type that captures file content as binary information but does not preserve any path information. attach :一种特殊类型,将文件内容捕获为二进制信息,但不保留任何路径信息。 Currently, this type is supported only in datajoint-python .目前,仅datajoint-python支持此类型。 Documentation is available for this type in File Attachment Datatype section. 文件附件数据类型部分提供了此类型的文档。
  • filepath : A special type that captures file content as binary information and includes path (along with file name) detail. filepath :一种特殊类型,将文件内容捕获为二进制信息并包括路径(以及文件名)详细信息。 Currently, this type is in preview in datajoint-python requiring it to be enabled.目前,此类型在datajoint-python中处于预览状态,需要启用它。 Documentation is available for this type in Filepath Datatype section.文件路径数据类型部分中提供了此类型的文档。 See note in documentation to enable it.请参阅文档中的注释以启用它。

For store , there is an External Store section in the documentation.对于store ,文档中有一个External Store部分。 Multiple stores can be configured as a mapping located under the stores key in dj.config .可以将多个商店配置为位于dj.config中的stores键下的映射。 For MATLAB, see help('dj.config') for examples and in Python, refer to the docs for attach and filepath above.对于 MATLAB,请参阅help('dj.config')以获取示例,在 Python 中,请参阅上述attach和文件filepath的文档。

Stores currently support 2 protocols:商店目前支持 2 种协议:

Issue #143 and PR's #197 , #327 that you've mentioned refer to efforts in implementing file , s3 stores for the blob datatype in DataJoint MATLAB.您提到的问题#143和 PR 的#197#327指的是在 DataJoint MATLAB 中为blob数据类型实现files3存储的工作。 The error you've experienced is expected and a simple placeholder until we support the other 2 datatypes in DataJoint MATLAB.在我们支持 DataJoint MATLAB 中的其他 2 种数据类型之前,您遇到的错误是预期的并且是一个简单的占位符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM