Updated on 2025-01-07 GMT+08:00

Creating a View

A view is a queryable object whose contents are defined by aggregation pipelines on other collections or views. This section describes how to create a view.

Procedure

  1. Log in to the DAS console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner, and under Databases, click Data Admin Service.
  4. In the navigation pane on the left, choose Development Tool.
  5. Locate the DB instance that you want to log in to and click Log In in the Operation column.
  6. On the top menu bar, choose Database Management.
  7. On the displayed Objects tab, choose Views and click Create View.
  8. On the displayed page, enter the view name and collection name.
  9. Click Add Pipeline Stage. In the displayed dialog box, select an operator and enter an expression.

    The aggregation pipeline you create appears in the list, and you can edit, delete, move up, or move down it.

  10. On the Collation tab, click Custom Collation and set collation rules as needed.
  11. After setting the view information, click Save.