.ingest inline command (push)

Applies to: ✅ Azure Data Explorer

This command inserts data into a table by pushing the data included within the command to the table.

Note

This ingestion method is intended for exploration and prototyping. Don't use it in production or high-volume scenarios.

Permissions

You must have at least Table Ingestor permissions to run this command.

Syntax

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

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

Learn more about syntax conventions.

Parameters

Name Type Required Description
TableName string ✔️ The name of the table into which to ingest data. The table name is always relative to the database in context, and its schema is the schema that will be assumed for the data if no schema mapping object is provided.
Data string ✔️ The data content to ingest. Unless otherwise modified by the ingestion properties, this content is parsed as CSV.
IngestionPropertyName, IngestionPropertyValue string Any number of ingestion properties that affect the ingestion process.

Note

Unlike most management 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.

Returns

The result is a table with as many records as the number of generated data shards ("extents"). If no data shards are generated, a single record is returned with an empty (zero-valued) extent ID.

Name Type Description
ExtentId guid The unique identifier for the data shard that was generated by the command

Examples

Ingest with <| syntax

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

Ingest with bracket syntax

The following command ingests data into a table Logs with two columns: Date (of type datetime) and EventDetails (of type dynamic).

.ingest inline into table Logs
    [2015-01-01,"{""EventType"":""Read"", ""Count"":""12""}"]
    [2015-01-01,"{""EventType"":""Write"", ""EventValue"":""84""}"]