Skip to content

Database

A Database Resource in DataOS acts as a repository for storing transaction data, utilizing a managed Postgres relational database. It fulfills the transactional data storage needs of custom data applications developed on top of DataOS. Internal applications like Lens Studio, Metis UI, etc., also leverage the Database Resource for their transactional data storage. Utilizing a Service supported by the Beacon Stack facilitates CRUD operations (Create, Read, Update, Delete) on data assets stored in the Database, ensuring smooth connectivity between the data application and the Database. For analytical operations, users can utilize the Flare Stack to move the data from transactional data storage to other Depots or Lakehouses.

Database Resource
Database Resource

Structure of Database manifest

#Attribtues for Resource
name: ${resource-name}                #database_name 
version: v1                           
type: database                        
description: ${description}
  - ${tag1}
  - ${tag2}
owner: ${iamgroot}
layer: ${user} 
database:                            # Specify the resource type
  migrate:
    includes:
      - ${migration-directory}     # Address to all migrations (relative path)
    includesInline:
      migration: |
        ${migration_script}

    command: ${migration-command}   # ("up" or "down")
  compute: ${runnable-default}
database_manifest_structure.yml
name: customersdb
version: v1
type: database
description: customersdb database created for testing.
tags:
  - database
database:
  migrate:
    includes: 
      - migration/
    command: up
  compute: runnable-default

First Steps

Database Resource in DataOS can be created by applying the manifest file using the DataOS CLI. To learn more about this process, navigate to the link: First steps.

Configuration

The Database manifest files serves as the blueprint for defining the structure and behavior of Database Resources within DataOS. By configuring various attributes within the the Database manifest file, data developers can customize it to meet specific requirements. Below is an overview of the key attributes used to configure a the Database-specific section: Attributes of Database manifest.

Recipes

Database Resource is used to store data on the fly. Your next steps depend upon whether you want to learn about what you can do with the database, here are some how to guides to help you with that process: