Skip to main content
Skip to main content

url

url 函数从 URL 创建一个具有给定 format 和 structure 的表。

url 函数可用于对URL表中的数据进行 SELECT 和 INSERT 的查询中。

语法

参数

  • URL — HTTP或HTTPS服务器地址,它可以接受 GET 或 POST 请求 (对应于 SELECT 或 INSERT 查询)。类型: String。
  • format — 数据格式。类型: String。
  • structure — 以 'UserID UInt64, Name String' 格式的表结构。确定列名和类型。 类型: String。

返回值

A table with the specified format and structure and with data from the defined URL.

示例

获取一个表的前3行,该表是从HTTP服务器获取的包含 String 和 UInt32 类型的列,以CSV格式返回。

将 URL 的数据插入到表中:

虚拟列​

  • _path — URL路径。
  • _file — 资源名称。

另请参阅