.ingest inline 命令(推送).ingest inline command (push)

此命令通过“推送”内嵌在命令文本本身中的数据将数据引入到表中。This command ingests data into a table by "pushing" the data that is embedded inline, in the command text itself.

备注

此命令用于手动临时测试。This command's used for manual ad-hoc testing. 对于生产使用,我们建议你使用其他更适合批量传送大量数据的引入方法,例如从存储引入For production use, we recommended that you use other ingestion methods that are better for bulk delivery of huge amounts of data, such as ingest from storage.

语法Syntax

.ingest inline into table TableName [with ( IngestionPropertyName = IngestionPropertyValue [, ...] )] <| Data.ingest inline into table TableName [with ( IngestionPropertyName = IngestionPropertyValue [, ...] )] <| Data

参数Arguments

  • TableName 是要将数据引入到其中的表的名称。TableName is the name of the table to ingest data into. 该名称始终与上下文中的数据库相关。The name is always related to the database in context. 如果没有提供架构映射对象,则表架构将是为数据假定的架构。The table schema is the schema that will be assumed for the data if no schema-mapping object is provided.

  • Data 是要引入的数据内容。Data is the data content to ingest. 除非已通过引入属性进行其他修改,否则此内容将作为 CSV 进行分析。Unless otherwise modified by the ingestion properties, this content is parsed as CSV.

备注

与大多数控制命令和查询不同,此命令的 Data 部分的文本不一定要遵循语言的语法约定。Unlike most control commands and queries, the text of the Data part of the command doesn't have to follow the syntactic conventions of the language. 例如,空格字符很重要,否则系统不会将 // 组合视为注释。For example, whitespace characters are important, or the // combination isn't treated as a comment.

  • IngestionPropertyName、IngestionPropertyValue:影响引入过程的任意数量的引入属性IngestionPropertyName, IngestionPropertyValue: Any number of ingestion properties that affect the ingestion process.

结果Results

结果是一个表,其中包含的记录数目与生成的数据分片(“盘区”)的数目相同。The result is a table with as many records as the number of generated data shards ("extents"). 如果未生成任何数据分片,则返回一条带有空(零值)盘区 ID 的记录。If no data shards are generated, a single record is returned with an empty (zero-valued) extent ID.

名称Name 类型Type 说明Description
ExtentIdExtentId guid 该命令生成的数据分片的唯一标识符The unique identifier for the data shard that was generated by the command

示例Examples

以下命令将数据引入到包含 SKU(类型为 string)和 Quantity(类型为 long)两列的表 (Purchases)。The following command ingests data into a table (Purchases) with two columns, SKU (of type string) and Quantity (of type long).

.ingest inline into table Purchases <|
Shoes,1000
Wide Shoes,50
"Coats, black",20
"Coats with ""quotes""",5