Creating a Metastore

Create a metastore in your tenancy. You can create only one metastore in a compartment in your tenancy.

    1. Open the navigation menu and click Analytics & AI. Under Data Lake, click Data Catalog.
    2. On the Data Catalog service page, click Metastores.
    3. Click Create Metastore.
    4. In the Create Metastore panel, perform the following actions:
      1. In Create in Compartment, select the compartment where you want to create the metastore.
      2. In the Name field, enter a name for the metastore.
      3. In the Default managed table location field, enter the Object Storage URL of the location of the managed table. For more information, see Prerequisites.
        Note

        We recommend that you do not use the same location for managed and external tables. If both the tables are in the same directory, deletion of data from managed table can result in loss of data from the external table also.
      4. In the Default external table location field, enter the Object Storage URL of the location of the external table. For more information, see Prerequisites.
      5. (Optional) In the Tags section, add tags that can help to identify the metastore.
    5. Choose one of the following:
      • To create the metastore, click Create.
      • To create the metastore later using Resource Manager and Terraform, click Save as Stack to save the resource definition as a Terraform configuration. For more information about saving stacks from resource definitions, see Creating a Stack from a Resource Creation Page.
  • Use the create command and required parameters to create a metastore:

    oci data-catalog metastore create [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the CreateMetastore operation to create a metastore.