> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File Uploads for Usage Data by Meter

In the Console, you can select a Meter you've set up to collect your usage data and upload a `CSV` formatted file for usage data measurements ingest. Some constraints are imposed on the size and formatting of the measurements file:

* **Size**. The file can contain up to a maximum of 1000 rows.
* **Formatting**. You must compile the file in a way that makes it compatible for file upload.

This topic explains how to prepare your usage data measurements CSV file and how to upload it:

* [Preparing Upload File - Example](/guides/billing-and-usage-data/submitting-usage-data/file-uploads-for-usage-data-by-meter#preparing-upload-file-example)
* [Uploading a File](/guides/billing-and-usage-data/submitting-usage-data/file-uploads-for-usage-data-by-meter#uploading-a-file)

<Tip>
  **Tip: Upload a JSON formatted usage data measurements file?** You can use the File Upload Service API to upload a measurements file in JSON format. On a **Meter Details** page in the Console on the **Submit Measurements** panel using the **File Upload API** tab, you can also do this directly. For more details, see the [File Upload Service API](/guides/billing-and-usage-data/submitting-usage-data/file-upload-service-api) topic in this section.
</Tip>

## Preparing Upload File - Example

For a successful and smooth CSV file upload for a Meter's usage data, you must ensure the file is correctly formatted and structured. To help you ensure these constraints are complied with, you can download a template for the CSV file for a Meter:

<img src="https://mintcdn.com/m3ter/97v2-eCLZ5ulkdC5/images/FileUploadMeter26.png?fit=max&auto=format&n=97v2-eCLZ5ulkdC5&q=85&s=eac8498fd44f2bb8e44c70b8cdaefcbc" alt="File Upload Meter26" width="1170" height="673" data-path="images/FileUploadMeter26.png" />

Suppose the Meter you want to upload a usage data measurements file for is set up with three Data Fields - two fields of Category **Measure** and one dimension field of Category **Who**. You plan to upload a file that contains ten measurements for this Meter. When you compile the file, you must ensure it conforms to the file upload requirements. Here's an example:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1720099434-fileuploadmeter18.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=60bc1e213a9a1777e4b6ecad16044378" style={{ maxWidth: 'min(850px, 100%)' }} width="1298" height="267" data-path="images/1720099434-fileuploadmeter18.png" />

Note in particular:

* **Column headers**:
  * Use all lower case for these.
  * For Meter Data Fields column headers, use the format *\<field category>.\<field code>*. For example, for the current Meter use: **measure.num\_apps**.
* **Measurement rows**:
  * Use valid codes for **account** and **meter**.
  * Ensure a column is included for each Meter Data Field and a value is given for each.
  * Use a unique **uid** for each measurement.
  * The **ts** value used must conform to **ISO-8601** format.

When you upload a `CSV` usage data measurements file, a validation check is made to ensure these formatting rules have been complied with. If errors are identified, the ingest will be blocked.

You can begin to compile a CSV file for upload by first downloading a template for a specific Meter.

**To download a template for a Meter's CSV file:**

1. Select **Metering**. The **Meters** page opens.
2. In the **Product** drop-down, select the Product for the Meter you want to upload a measurements file.
3. Select the hotlink text of the Meter for which you want to perform a usage data measurements upload using a CSV file. The **Meter Details** page opens.
4. On the **Meter Details** card, select **Download CSV template**. A CSV file is downloaded to your Downloads folder. This is pre-formatted to agree with the specific Meter's Data Field configuration:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1720100004-fileuploadmeter20.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=4f864eba2a02c4ba283a1f1df472eeff" style={{ maxWidth: 'min(600px, 100%)' }} width="825" height="149" data-path="images/1720100004-fileuploadmeter20.png" />

For the current example Meter, we can see that the template complies with the required formatting and structure, and we can safely begin to enter measurements into the file in preparation for usage data ingest.

## Uploading a File

<Warning>
  **Warning! Check File:** Before you attempt to upload a `CSV` formatted usage data measurements file through the Meter Details page in the Console, please review the file to ensure it conforms with the upload formatting rules as explained in the [previous section](/guides/billing-and-usage-data/submitting-usage-data/file-uploads-for-usage-data-by-meter#preparing-upload-file-example).
</Warning>

**To upload usage data measurements file through the Console:**

1. Select **Metering**. The **Meters** page opens.
2. You first need to locate the Meter you want to upload a usage data measurements file for:

* You can select or search for the Product to which the Meter belongs. Use the **Product**s drop-down at top-right, select the Product the Meter belongs to. The **Meters** page adjusts and shows:
  * The selected Product and any existing Meters created for it.
  * Any Global Meters.
* Alternatively, in the **Search** box at top-left, start to type in the name of the Meter. The Meter pages adjusts as you type and shows:
  * The Meters whose name matches the entered text string and listed under the Product they belong to.
  * Any Global Meters whose name matches the entered text string.

3. Select the **Name** hotlink text of the Meter. The **Meter Details** page opens.
4. Scroll down the page to the **Submit measurements** panel.
5. Select the **Upload CSV** tab:

<img src="https://mintcdn.com/m3ter/N9N9XCn9O5IxOoK9/images/FileUploadMeter27.png?fit=max&auto=format&n=N9N9XCn9O5IxOoK9&q=85&s=d93a60e3383ff3b24d70e05994fa404e" alt="File Upload Meter27" width="1242" height="748" data-path="images/FileUploadMeter27.png" />

6. Select **Browse** and use the search window to find and select the file you want to upload. The `CSV` file is parsed and loaded into the **Upload usage data** as a measurements table for you to review:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1720099046-fileuploadmeter16.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=970b5a7b392eed4419e226bd1594995c" style={{ maxWidth: 'min(850px, 100%)' }} width="1300" height="454" data-path="images/1720099046-fileuploadmeter16.png" />

<Warning>
  **Important: Invalid CSV file!** If you select a CSV file with an invalid format, then you'll receive and error when parsing of the file is attempted.
</Warning>

7. If on review you are satisfied with the measurements that are loaded, select **Submit usage**. The measurements contained in the file are ingested and under the **Log** section of the tab:

* You'll see a `{"result" : "accepted"}` message.
* The timestamp for the ingest is given.
* The JSON for the measurements ingest is reproduced and you can scroll the **Log** window.

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1725356281-fileuploadmeter24.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=cb5515b685ca8e7cd05e965be5f15404" style={{ maxWidth: 'min(550px, 100%)' }} width="655" height="464" data-path="images/1725356281-fileuploadmeter24.png" />

Note that if you attempt to submit a usage data measurements file that when loaded into the **Upload CSV** tab contains rows that do not conform to the formatting requirements, use invalid codes, or are missing required values, the ingest will fail. Error messages are shown to help you make good the file and successfully re-submit:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1720100459-fileuploadmeter22.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=59cdff1ef44569b8b7fe5d7e5f1a32b0" style={{ maxWidth: 'min(850px, 100%)' }} width="1301" height="389" data-path="images/1720100459-fileuploadmeter22.png" />

<Tip>
  **Tip: Check usage data ingest?** If you want to check the usage data measurements ingest, you can open [Data Explorer (v2)](/guides/data-explorer/usage-data-explorer-v2) and submit a Usage Data query.
</Tip>
