docstr: Get a view by name
docstr_tok: ["Get","a","view","by","name"]
code: def get(self, project_name, view_name):
      """Get a view by name"""
      session = SessionController()
      try:
          project = session.database_controller.get_project(
              project_name
          )
      except NoResultFound:
          abort(
              HTTPStatus.NOT_FOUND,
              f"Project name {project_name} does not exist",
          )
  
      view = project.get_view(view_name)
      if view is None:
          abort(
              HTTPStatus.NOT_FOUND,
              f"View with name {view_name} does not exist",
          )
  
      # Only want to return relevant fields to the user.
      return {
          "id": view["metadata"]["id"],
          "name": view["name"],
          "query": view["query"],
      }
  
file_path: mindsdb/mindsdb/api/http/namespaces/views.py
imports: from http import HTTPStatus
  from flask import request
  from flask_restx import Resource, abort
  from sqlalchemy.exc import NoResultFound
  from mindsdb.api.http.namespaces.configs.projects import ns_conf
  from mindsdb.api.executor.controllers.session_controller import SessionController
label_desc: Use image node_id 1 for calling the ViewResource obj's underlying member method code with example usage: obj.get(project_name, view_name) and returns: dict