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

# create_materialized_view

### create\_materialized\_view

<ul>
  <li>
    create\_materialized\_view(\
    &#x20;table\_name: string,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[CreateMaterializedViewResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateMaterializedViewResponse.md)>

    Initiates the process of creating a materialized view, reserving the view's name to prevent other views or tables from being created with that name.For materialized view details and examples, see Materialized Views.The response contains `view_id`, which is used to tag each subsequent operation (projection, union, aggregation, filter, or join) that will compose the view.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of the table to be created that is the top-level table of the materialized view, in \[schema\_name.]table\_name format, using standard name resolution rules and meeting table naming criteria.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CreateMaterializedViewResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateMaterializedViewResponse.md)>

    Promise\<Types.CreateMaterializedViewResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:6413](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L6413)</li>
    </ul>
  </li>
</ul>

### create\_materialized\_view\_request

<ul>
  <li>
    create\_materialized\_view\_request(\
    &#x20;request: [CreateMaterializedViewRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateMaterializedViewRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[CreateMaterializedViewResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateMaterializedViewResponse.md)>

    Initiates the process of creating a materialized view, reserving the view's name to prevent other views or tables from being created with that name.For materialized view details and examples, see Materialized Views.The response contains `view_id`, which is used to tag each subsequent operation (projection, union, aggregation, filter, or join) that will compose the view.

    #### Parameters

    <ul>
      <li>
        request: [CreateMaterializedViewRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateMaterializedViewRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CreateMaterializedViewResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateMaterializedViewResponse.md)>

    Promise\<Types.CreateMaterializedViewResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:6382](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L6382)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.