Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The sample app generator wizard is a tool that allows you to create a working app to ingest and query your data in your preferred programming language. The generated code references the relevant SDK frameworks and is tailored to your cluster and data. The app is a self-contained, executable example that demonstrates how to connect to a cluster using authentication, administer, and ingest and query data using the SDK.
You can use the generated code as a baseline to write your own apps, altering the code as you go, or you can copy sections of code into your own apps. The code includes comments with tips, best practices, links to reference material, and recommended TODO changes when adapting the code to your needs.
Note
To enable access between a cluster and a storage account without public access (restricted to private endpoint/service endpoint), see Create a Managed Private Endpoint.
The sample app generator wizard guides you through the ingestion process.
To access the wizard from the Azure Data Explorer web UI:
Select Query in the left pane.
Right-click on the desired table, and select Generate > Sample code.
This section describes the wizard in general. The options you select depend on what data format you're ingesting, what kind of data source you're ingesting from, and whether you're ingesting into a new or existing table.
The wizard guides you through the following options:
In the Destination tab:
Select the Cluster and Database.
Choose whether to use an Existing table or a New table. For an existing table, select the table from the options. For a new table, give the table a name.
Select the Programming language for your app.
Select Next: Source.
In the Source tab:
Choose from the following options:
If you selected Query and ingest, select the source file or blob for ingestion.
Select Next: Schema.
In the Schema tab, the service automatically generates schema and ingestion properties, which you can modify as needed. To set up the schema:
Confirm the autogenerated Compression type.
Choose the Data format from the formats supported by Azure Data Explorer for ingestion. Different formats have different specifications.
In the Partial data preview window, adjust the schema as needed. To do this, select the arrow at the top of a column to open a menu with options for changing the data type, creating a new column, deleting a column, and more. If your data is in Parquet, JSON, or Avro format, you can apply mapping transformations.
Select Next: Generate sample app.
Tip
To view, edit, and copy the commands generated from your inputs, open the command viewer above the Partial data preview window.
Parquet, JSON, and Avro data formats support simple ingest-time transformations. To apply mapping transformations, create or update a column in the Partial data preview window.
Mapping transformations can be performed on a column of type string or datetime, with the source data having data type int or long. Supported mapping transformations are:
For more information, see Mapping transformations.
Once you've completed schema mapping and column manipulations, the sample app generator wizard starts the code generation process. After code generation, the sample app project will be available for download as a ZIP file.
Detailed instructions for running the project with the selected SDK are provided upon successful generation and within the sample project file. In addition, the wizard gives you options to use Quick queries for initial exploration of your data.
Note
You may need to run the downloaded app for the Quick queries to work.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today