Use one-click ingestion to ingest JSON data from a local file to an existing table in Azure Data Explorer
One-click ingestion enables you to quickly ingest data in JSON, CSV, and other formats into a table and easily create mapping structures. The data can be ingested either from storage, from a local file, or from a container, as a one-time or continuous ingestion process.
This document describes using the intuitive one-click wizard in a specific use case to ingest JSON data from a local file into an existing table. Use the same process with slight adaptations to cover a variety of different use cases.
For an overview of one-click ingestion and a list of prerequisites, see One-click ingestion. For different types or sources of data, see Use one-click ingestion to ingest CSV data from a container to a new table in Azure Data Explorer.
Ingest new data
In the left menu of the Web UI, right-click a database or table and select Ingest new data (Preview).
Select an ingestion type
In the Ingest new data (Preview) window, the Source tab is selected.
If the Table field isn't automatically filled, select an existing table name from the drop-down menu.
If you select Ingest new data (Preview) on a table row, the selected table name will appear in the Project Details.
Under Ingestion type, do the following steps:
Select from file
Select Browse to locate the file, or drag the file into the field.
A sample of the data appears. Filter the data to ingest only files that begin or end with specific characters.
When you adjust the filters, the preview automatically updates.
For ingestion from container, see Use one-click ingestion to ingest CSV data from a container to a new table in Azure Data Explorer
Edit the schema
Select Edit schema to view and edit your table column configuration.
The Map columns dialog opens. Attach one or more source columns or attributes to your Azure Data Explorer columns.
New mappings are set automatically, or use an existing mapping.
In the Source columns fields, enter column names to map with the Target columns.
To delete a column from mapping, select the trash can icon.
In the Schema tab:
Compression type will be selected automatically by the source file name. In this case, the compression type is JSON
When you select JSON, you must also select JSON levels, from 1 to 10. The levels determine the table column data division.
If you want to use CSV files, see Use one-click ingestion to ingest CSV data from a container to a new table in Azure Data Explorer
Edit the table
When ingesting data to an existing table, you are more limited in the changes you may make to the table.
In the table:
- Select new column headers to add a New column, Delete column, Sort ascending, or Sort descending.
- On existing columns, only data sorting is available.
|Change data type||Change the data type from the one automatically selected by the service to one of the other supported data types|
|Rename column||Change the column name|
|New column||Add a new column. For tabular formats, each column can be ingested into one column on ADX. A new column can be created from a different JSON level.|
|Delete column||Delete the selected column|
|Sort ascending||Sort the table by the selected column in ascending order (existing columns only)|
|Sort descending||Sort the table by the selected column in descending order (existing columns only)|
Above the Editor pane, select the v button to open the editor. In the editor, you can view and copy the automatic commands generated from your inputs.
You can't update the name and datatype for existing tables.
Select Start ingestion to create a table and mapping and to begin data ingestion.
Complete data ingestion
In the Data ingestion completed window, all three steps will be marked with green check marks when data ingestion finishes successfully.
To set up continuous ingestion from a container, see Use one-click ingestion to ingest CSV data from a container to a new table in Azure Data Explorer
Explore quick queries and tools
In the tiles below the ingestion progress, explore Quick queries or Tools:
Quick queries includes links to the Web UI with example queries.
Tools includes links to Undo or Delete new data on the Web UI, which enable you to troubleshoot issues by running the relevant
You might lose data when you use
.dropcommands. Use them carefully. Drop commands will only revert the changes that were made by this ingestion flow (new extents and columns). Nothing else will be dropped.