Skip to content

Commit 098a6bb

Browse files
tothmanoc-ehrlichbenenharrington
authored
Add views (#275)
Co-authored-by: Christopher Ehrlich <[email protected]> Co-authored-by: benenharrington <[email protected]>
1 parent 24dc70e commit 098a6bb

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"query-data/stream",
145145
"query-data/explore",
146146
"query-data/visualizations",
147+
"query-data/views",
147148
"query-data/virtual-fields",
148149
"query-data/traces"
149150
]

query-data/datasets.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ When you select a dataset, Axiom displays the list of fields within the dataset
2323
This view flattens field names with dot notation. This means that the event `{"foo": { "bar": "baz" }}` appears as `foo.bar`. Field names containing periods (`.`) are folded.
2424

2525
On the right, you see the following:
26+
- [Views](#views)
2627
- [Saved queries](#saved-queries)
2728
- [Query history](#query-history)
2829

@@ -57,6 +58,12 @@ For more information, see [Virtual fields](/query-data/virtual-fields).
5758

5859
Map fields are a special type of field that can hold a collection of nested key-value pairs within a single field. You can think of the content of a map field as a JSON object. The Dataset tab enables you to create map fields, and view unused and removed map fields. For more information, see [Map fields](/apl/data-types/map-fields#create-map-fields).
5960

61+
## Views
62+
63+
Views allow you to apply commonly-used filters and transformations to your dataset. The result is a view that you can use similarly to how you use datasets. The concept of a view in Axiom is similar to the concept of a virtual table in a database.
64+
65+
For more information, see [Views](/query-data/views).
66+
6067
## Queries
6168

6269
Every query has a unique ID that you can save and share with your team members. The Datasets tab allows you to do the following:

query-data/views.mdx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: 'Views'
3+
description: 'This page explains how to use views in Axiom.'
4+
---
5+
6+
Views allow you to apply commonly-used filters and transformations to your dataset. The result is a view that you can use like you use datasets:
7+
8+
- You can reference views in queries, dashboards, and monitors in the same way you reference datasets. For example, you can create queries that look for data in a view and you can use this query to [visualize data](/query-data/explore) in the Query tab, create a [dashboard element](/dashboard-elements/overview), or set up a [monitor](/monitor-data/monitors).
9+
- You can share and control access to views in the same way you do with datasets using role-based access control (RBAC). For example, views allow you to grant other users scoped access to your datasets. This means that instead of sharing the whole dataset with other users, you have the option to share only a filtered and transformed representation of the data. You define a view using a query that applies filters and transformations to your dataset, and then you only share the results of this query with another user.
10+
11+
Contrary to datasets:
12+
13+
- You can’t ingest directly to a view.
14+
- You can’t trim or delete data from a view.
15+
- You can’t create a view from another view.
16+
17+
The concept of a view in Axiom is similar to the concept of a virtual table in a database.
18+
19+
### Create view
20+
21+
1. Select a dataset.
22+
1. In the top right of the **Views** section, click **+ Create view**.
23+
1. Create the query using the [visual query builder](/query-data/explore#create-a-query-using-the-visual-query-builder) or the [Axiom Processing Language (APL)](/query-data/explore#create-a-query-using-apl).
24+
1. Below the query, check the preview of the events and the fields that your query returns.
25+
1. Name the view and optionally add a description.
26+
1. Click **Create view**.
27+
28+
### Display view
29+
30+
1. Select a dataset.
31+
1. In the **Views** section on the right, click the view you want to display.
32+
33+
### Grant access to view
34+
35+
All views are available to users with organization-level read access to views. You can allow users without these permissions to access an individual view in the same way you grant access to individual datasets:
36+
37+
1. Click <img src="/doc-assets/icons/settings.svg" className="inline-icon" alt="Settings icon" /> **Settings > Roles**.
38+
1. Click the role with which you want to share the view or create a new role.
39+
1. In the **Individual datasets** section, click **Add dataset**.
40+
1. Start typing the name of the view. In the list, find the view that you want to share, and then click **Add**.
41+
<Note>
42+
It’s enough to grant access to the view. You don’t need to grant access to the underlying dataset.
43+
</Note>
44+
1. Click **Save**.

0 commit comments

Comments
 (0)