跳转至

Read and write data(读写数据)

Slate can send and receive data from both Foundry and external systems. Object sets, object context, and Foundry Functions provide easy read access to the Ontology, while the Actions widget specifically allows users to write back to the Ontology.

Queries provide generic access to various pre-configured end points. Every data source in queries must be configured via the admin panel. Once configured, users can leverage queries to pull data from other services directly into their application, or trigger post-requests to write data directly into external databases. Query usability is the most flexible and open feature for importing and exporting data in Slate.

All data imported is represented in Slate in a JSON format, thereby unifying data from all datasources into a single structure. Once data lands in Slate, it loses this context and can be freely manipulated to produce the desired workflows.

Import and export components can be configured to use variables, functions, widgets, or outputs of other queries and read and write data dynamically. Queries compared to object sets or Actions can be constructed to be agnostic and are not limited to pre-configured interactions. The same query might create a new data point first, but a second run of the query would then update the previously created data point.

Object sets, object context, Foundry Functions, and Actions are easier to set up and provide clear rails, but are less flexible in return.


中文翻译


读写数据

Slate 可以从 Foundry 和外部系统收发数据。对象集(Object sets)对象上下文(Object context)Foundry 函数(Foundry Functions) 提供了对本体(Ontology)的便捷读取访问,而 操作组件(Actions widget) 则专门允许用户将数据写回本体。

查询(Queries) 提供了对各种预配置端点的通用访问。查询中的每个数据源都必须通过管理面板进行配置。配置完成后,用户可以利用查询从其他服务直接拉取数据到应用程序中,或触发 POST 请求将数据直接写入外部数据库。查询的可用性是 Slate 中导入和导出数据最灵活、最开放的功能。

所有导入的数据在 Slate 中均以 JSON 格式呈现,从而将所有数据源的数据统一为单一结构。数据进入 Slate 后,便失去了原有上下文,可以自由操作以生成所需的工作流。

导入和导出组件可配置为使用变量、函数、组件或其他查询的输出,并动态读写数据。与对象集或操作组件相比,查询可以构建为与具体场景无关,且不受限于预配置的交互方式。同一个查询可能首先创建一个新的数据点,但第二次运行该查询时,则会更新之前创建的数据点。

对象集、对象上下文、Foundry 函数和操作组件更易于设置,并提供清晰的规范,但灵活性相对较低。