Skip to main content

Export query results

Download item data in a standard format

After creating and refining a query in the Data Explorer app, you can export the results in a standard data format, enabling you to store or process the data in other software.

Example item data exported as a CSV, viewed in Microsoft Excel
Note

To import data into Alloy, see Gateway.

Export a query

To export the results of the active query tab:

  1. Select Export results in the bottom toolbar. If you can't see it, select to open the overflow menu.

  2. In the window that appears, select Export file type and choose one of the following:

    • CSV - a text file that stores data as comma-separated values. Widely compatible with most software.

    • SHP - a popular format for storing geographic locations. It can describe points, lines and polygons in geographic space, along with custom attribute data. To learn more, see Shapefile on Wikipedia.

The Export window showing a chosen file type, attribute header type and coordinate system
  1. If CSV is chosen, select Export attribute header type and choose one of the following:

    • Name (default) - attributes will be labelled with their name, e.g. Installed Date

    • Code - attributes will be labelled with their code, e.g. attributes_assetsInstalledDate

  2. If the query fetches geometry data, select Coordinate system and choose one of the following:

  3. Select Save to begin the export. When the export is ready, your browser will start downloading a zip file containing your exported data files.

Note

While exports typically process in minutes, queries involving lots of data may take significantly longer ⏳. Alloy will email you the download link when it's ready, so feel free to close your browser and come back later!

Linked data

If the exported query fetches values for any join attributes, they will be stored in a separate CSV file (one per linked design/interface). Each linked CSV contains Predecessor data to help you reconstruct the relationships between the linked items.

For example, imagine a query that fetches street lights and their defects. For each parent Street Lights item, the query will fetch any child items stored in their Defects attribute. For each stored Defects item, the query will fetch the value of their Defect Number attribute.

The exported zip file will contain two CSV files: one for items of the queried Street Lights design and one for items of the linked Defects interface. Each item in the Defects CSV can be matched to the Item ID of its parent Street Lights item and vice versa.

Caution

Due to the limitations of the shapefile format, exporting to SHP will only store data for attributes on the queried design/interface. Any linked attribute data will be excluded!