# Analytics FAQ

#### Why are my scheduled exports not working?

* The most common reason your [scheduled exports](https://manual.firstresonance.io/analytics/ion-analytics#scheduled-exports-notifications) are not working is that the last ION environment you logged into was your "Sandbox" environment. Doing so has marked your user credentials as "Sandbox" and thus production"Production" exports can not be performed against those credentials.
* The solution is to make sure that they last environment you log into is your "Production" environment before you expect any exports to occur.
* We also recommend using a dedicated ION service account to set up your scheduled exports in Analytics. This helps minimize cross-environment credential conflicts by reducing the need to log into multiple environments. For example, a service account intended for the production-pub environment should only be used there, ensuring consistent access and export behavior.

#### How do I control read vs. write access within ION Analytics?

* See the manual page [here](https://manual.firstresonance.io/analytics/ion-analytics#manage-permissions-within-ion). To manage read or write access in ION Analytics, choose a permission set from ION’s **Settings** menu. These permission sets can be assigned to roles (e.g., **engineer**) so that the correct permissions are automatically applied when roles are granted during onboarding.

<figure><img src="/files/pqAwVmJAeJwlZW9oreya" alt="" width="375"><figcaption></figcaption></figure>

#### How can I join custom attributes to bring their key–value pairs into another dataset or view?

Bring custom attribute key–value pairs into another dataset or view by joining on the attributes base table.

* Custom Attributes are set up so that there is 1 row for each `id + key` combination. This means that there will be **X number of rows for each foreign\_key** (i.e `run_id` in the `runs_attributes_base` table) where **X = # of custom attributes.**
* This is important because that means if you join the `runs` table to the `runs_attributes_base` on **ONLY** the `run_id` then you will get a new row for each attribute. The example join below would result in duplicate rows and bog down the query with unnecessary compute:

<figure><img src="/files/48m9E2O74HEjGrO6c7jb" alt=""><figcaption></figcaption></figure>

* If you want to bring in a specific attribute then you need to join on BOTH the `id` AND the key that you care about.&#x20;
* If you have a `run_attribute_key = “Work Order”` then you would need to join on `run_id` and `key = “Work Order”` (Here is an [example video](https://www.loom.com/share/5bebed31b2564256972f90ea91ca9ce1)):

<figure><img src="/files/lsIFebqrQq7kBgmbRFVJ" alt=""><figcaption></figcaption></figure>

* The above example will be more efficient with compute and avoid duplicate rows.

#### How do I access ION User type custom attributes?

* Our analytics platform is designed to handle robust, in-depth queries across millions (if not billions) of data points. As is standard with modern BI tools (Power BI, Tableau, Looker, etc.), certain dashboard views and reports may take longer to generate due to the complexity of the underlying queries.
* ION manages complex manufacturing processes, and the resulting data is just as intricate and interconnected.
* Simple reports often appear within seconds, while more complex dashboards will take longer to load (including up to a few minutes) depending on data size and the number of calculations involved.
* **How to Improve Performance**
  * **Refine Queries**: Limit the scope of analysis with filters or break large dashboards into smaller, targeted views.
  * **Limit joins:** Limit the number of joins across data sets
  * **Request Datasets:** If you find yourself consistently trying to join a large number of tables that revolve around a specific use case.
* For enterprise customers running very large queries and looking to incorporate additional data sources, utilize your access to IONs Data Connector to bring this information into a platform of your choosing.

This is made possible through the entities table and two joins.

1. Take your desired attributes and join attributes -> entities (join on entity\_id = entity\_id)
2. Join users onto the new entities with two join keys as follows, entities -> users (join on entity\_id = entity\_id AND entities.TYPE = "user")
3. From you can get users.name / users.email as the associated ION User attribute type!

<figure><img src="/files/BUWjz1lao2Fx7GYDVa4G" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/RsyRp4vQaDKpHqgbA7IK" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.firstresonance.io/ion-analytics/analytics-faq.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
