Class AtlasProject

An AtlasDataset represents a single mutable dataset in Atlas. It provides an interfaces to upload, update, and delete data, as well as create and delete indices which handle specific views.

Hierarchy

  • BaseAtlasClass<components["schemas"]["Project"]>
    • AtlasProject

Constructors

  • Parameters

    • id: string

      The project's unique UUID. To create a new project or fetch an existing project, use the create_project or load_project functions.

    • Optional viewer: AtlasViewer

    Returns AtlasProject

    An AtlasDataset object.

Properties

_attr: undefined | {
    access_role: "ADMIN" | "VIEWER" | "EXTERNAL" | "NONE" | "EDITOR";
    atlas_indices: {
        atoms: string[];
        colorable_fields: string[];
        created_timestamp: string;
        embedders: {
            atlas_index_id: string;
            hyperparameters: Record<string, unknown>;
            id: string;
            model_name: string;
            ready: boolean;
        }[];
        id: string;
        index_name: string;
        indexed_field: string;
        nearest_neighbor_indices: {
            atom_strategies: string[];
            hyperparameters: Record<string, unknown>;
            id: string;
            index_name: string;
            ready: boolean;
        }[];
        project_id: string;
        projections: {
            atom_strategies: string[];
            created_timestamp: string;
            hyperparameters: Record<string, unknown>;
            id: string;
            og_image?: string;
            projection_name: string;
            ready: boolean;
            thumbnail?: string;
            updated_timestamp: string;
        }[];
        updated_timestamp: string;
    }[];
    connector_details?: {
        creation_params: Record<string, unknown>;
        id: string;
    };
    connector_name?: string;
    created_timestamp: string;
    creator: string;
    creator_nickname: string;
    creator_picture: string;
    description: string;
    id: string;
    insert_update_delete_lock: boolean;
    is_public: boolean;
    is_public_to_org: boolean;
    modality?: string;
    og_image: string;
    organization_name: string;
    organization_slug: string;
    owner: string;
    permissions: {
        [key: string]: boolean;
    };
    project_fields: string[];
    project_name: string;
    schema?: string;
    slug: string;
    total_datums_in_project: number;
    unique_id_field: string;
}

Type declaration

  • access_role: "ADMIN" | "VIEWER" | "EXTERNAL" | "NONE" | "EDITOR"

    Description

    Access role of user for this project

  • atlas_indices: {
        atoms: string[];
        colorable_fields: string[];
        created_timestamp: string;
        embedders: {
            atlas_index_id: string;
            hyperparameters: Record<string, unknown>;
            id: string;
            model_name: string;
            ready: boolean;
        }[];
        id: string;
        index_name: string;
        indexed_field: string;
        nearest_neighbor_indices: {
            atom_strategies: string[];
            hyperparameters: Record<string, unknown>;
            id: string;
            index_name: string;
            ready: boolean;
        }[];
        project_id: string;
        projections: {
            atom_strategies: string[];
            created_timestamp: string;
            hyperparameters: Record<string, unknown>;
            id: string;
            og_image?: string;
            projection_name: string;
            ready: boolean;
            thumbnail?: string;
            updated_timestamp: string;
        }[];
        updated_timestamp: string;
    }[]

    Atlas Indices

    Description

    All Atlas Indices built overtop of this project.

  • Optional connector_details?: {
        creation_params: Record<string, unknown>;
        id: string;
    }

    Connector Details

    Description

    The connector details for this project

    • creation_params: Record<string, unknown>

      Creation Params

    • id: string

      Id Format: uuid

  • Optional connector_name?: string

    Connector Name

    Description

    The connector name used to create this project

  • created_timestamp: string

    Created Timestamp Format: date-time

    Description

    The timestamp this project was created.

  • creator: string

    Creator

    Description

    The user id who created this project.

  • creator_nickname: string

    Creator Nickname

    Description

    The creator nickname

  • creator_picture: string

    Creator Picture

    Description

    The creator picture

  • description: string

    Description

    Description

    A description for this project.

  • id: string

    Id Format: uuid

    Description

    Project ID

    Example

    33adcf85-84ed-4e3a-9519-17c72682f905
    
  • insert_update_delete_lock: boolean

    Insert Update Delete Lock

    Description

    Whether the project is locked for CRUD operations.

  • is_public: boolean

    Is Public

    Description

    Is the project viewable without being in the organzation?

  • is_public_to_org: boolean

    Is Public To Org

    Description

    Is the project viewable to the organization?

  • Optional modality?: string

    Modality

    Description

    The project modality

  • og_image: string

    Og Image

    Description

    The datasets opengraph image

  • organization_name: string

    Organization Name

    Description

    The organization nickname

  • organization_slug: string

    Organization Slug

    Description

    The organization url-safe slug

  • owner: string

    Owner Format: uuid

    Description

    The organization ID that owns this project

    Example

    43adcf85-84ed-4e3a-9519-17c72682f905
    
  • permissions: {
        [key: string]: boolean;
    }

    Permissions

    Description

    Access role of user for this dataset

    • [key: string]: boolean
  • project_fields: string[]

    Project Fields

    Description

    The list of fields a datum in the project may contain.

  • project_name: string

    Project Name

    Description

    The name of this project

    Example

    example_project
    
  • Optional schema?: string

    Schema

    Description

    An Arrow schema for the project. Binary data encoded as base64.

  • slug: string

    Slug

    Description

    The project url-safe slug

  • total_datums_in_project: number

    Total Datums In Project

    Description

    Total datums in project.

  • unique_id_field: string

    Unique Id Field

    Description

    The field that contains a unique id for each document.

_indices: AtlasIndex[] = []
_schema?: null | Schema<any>
attributePromise: undefined | Promise<{
    access_role: "ADMIN" | "VIEWER" | "EXTERNAL" | "NONE" | "EDITOR";
    atlas_indices: {
        atoms: string[];
        colorable_fields: string[];
        created_timestamp: string;
        embedders: {
            atlas_index_id: string;
            hyperparameters: Record<string, unknown>;
            id: string;
            model_name: string;
            ready: boolean;
        }[];
        id: string;
        index_name: string;
        indexed_field: string;
        nearest_neighbor_indices: {
            atom_strategies: string[];
            hyperparameters: Record<string, unknown>;
            id: string;
            index_name: string;
            ready: boolean;
        }[];
        project_id: string;
        projections: {
            atom_strategies: string[];
            created_timestamp: string;
            hyperparameters: Record<string, unknown>;
            id: string;
            og_image?: string;
            projection_name: string;
            ready: boolean;
            thumbnail?: string;
            updated_timestamp: string;
        }[];
        updated_timestamp: string;
    }[];
    connector_details?: {
        creation_params: Record<string, unknown>;
        id: string;
    };
    connector_name?: string;
    created_timestamp: string;
    creator: string;
    creator_nickname: string;
    creator_picture: string;
    description: string;
    id: string;
    insert_update_delete_lock: boolean;
    is_public: boolean;
    is_public_to_org: boolean;
    modality?: string;
    og_image: string;
    organization_name: string;
    organization_slug: string;
    owner: string;
    permissions: {
        [key: string]: boolean;
    };
    project_fields: string[];
    project_name: string;
    schema?: string;
    slug: string;
    total_datums_in_project: number;
    unique_id_field: string;
}>
id: string
viewer: AtlasViewer

Accessors

  • get attr(): undefined | AttributesType
  • returns the object's information; this may be undefined

    Returns undefined | AttributesType

  • get schema(): undefined | null | Schema<any>
  • Returns undefined | null | Schema<any>

Methods

  • Parameters

    • records: Record<string, string>[]

    Returns Promise<void>

  • Parameters

    • endpoint: string
    • method: "GET" | "POST"
    • payload: Payload = null
    • headers: null | Record<string, string> = null

    Returns Promise<null | string | any[] | Record<string, any> | Uint8Array | Table<any>>

  • Prefer createIndexRaw, which has better syncing of types

    Parameters

    • options: Omit<IndexCreateOptions, "project_id">

    Returns Promise<AtlasIndex>

    Deprecated

  • This should be preferred over createIndex, as it uses the actual up-to-date types. Note that it is definitely possible to pass a malformed but type-compliant object. (E.g., specifying no embedding field but also specifying a model.)

    Parameters

    • options: Partial<{
          atomizer_strategies?: string[];
          build_from_versioned_dataset?: boolean;
          colorable_fields?: string[];
          duplicate_detection_hyperparameters?: string;
          geometry_strategies?: string[][];
          index_name?: string;
          indexed_field: string;
          modality?: string;
          model: string;
          model_hyperparameters: string;
          nearest_neighbor_index: string;
          nearest_neighbor_index_hyperparameters: string;
          project_id: string;
          projection: string;
          projection_hyperparameters: string;
          reuse_atoms_and_embeddings_from?: string;
          topic_model_hyperparameters?: string;
      }> & {
          indexed_field: string;
      }

      See types for options.

    Returns Promise<AtlasIndex>

    an AtlasIndex object based on the new arguments.

  • Returns Promise<null | string | any[] | Record<string, any> | Uint8Array | Table<any>>

  • Parameters

    • ids: string[]

    Returns Promise<void>

  • Returns string

  • Fetches basic information about the object. By default, this caches the call; if you want to bust the cache, pass true as the first argument. This immediately.

    Parameters

    • bustCache: boolean = false

      Whether to refetch the relevant information

    Returns Promise<{
        access_role: "ADMIN" | "VIEWER" | "EXTERNAL" | "NONE" | "EDITOR";
        atlas_indices: {
            atoms: string[];
            colorable_fields: string[];
            created_timestamp: string;
            embedders: {
                atlas_index_id: string;
                hyperparameters: Record<string, unknown>;
                id: string;
                model_name: string;
                ready: boolean;
            }[];
            id: string;
            index_name: string;
            indexed_field: string;
            nearest_neighbor_indices: {
                atom_strategies: string[];
                hyperparameters: Record<string, unknown>;
                id: string;
                index_name: string;
                ready: boolean;
            }[];
            project_id: string;
            projections: {
                atom_strategies: string[];
                created_timestamp: string;
                hyperparameters: Record<string, unknown>;
                id: string;
                og_image?: string;
                projection_name: string;
                ready: boolean;
                thumbnail?: string;
                updated_timestamp: string;
            }[];
            updated_timestamp: string;
        }[];
        connector_details?: {
            creation_params: Record<string, unknown>;
            id: string;
        };
        connector_name?: string;
        created_timestamp: string;
        creator: string;
        creator_nickname: string;
        creator_picture: string;
        description: string;
        id: string;
        insert_update_delete_lock: boolean;
        is_public: boolean;
        is_public_to_org: boolean;
        modality?: string;
        og_image: string;
        organization_name: string;
        organization_slug: string;
        owner: string;
        permissions: {
            [key: string]: boolean;
        };
        project_fields: string[];
        project_name: string;
        schema?: string;
        slug: string;
        total_datums_in_project: number;
        unique_id_field: string;
    }>

    A promise that resolves to the organization info.

  • Parameters

    • Optional ids: string[]

      A list of identifiers to fetch from the server.

    Returns Promise<Record<string, Record<string, any>>>

  • Returns Promise<{
        atom_strategies: string[];
        created_timestamp: string;
        hyperparameters: Record<string, unknown>;
        id: string;
        og_image?: string;
        projection_name: string;
        ready: boolean;
        thumbnail?: string;
        updated_timestamp: string;
    }[]>

    A list of projection summaries, sorted so that the first is the most useable (defined as ready and newest)

  • Updates all indices associated with a project.

    Parameters

    • rebuild_topic_models: boolean = false

      If true, rebuilds topic models for all indices.

    Returns Promise<void>

  • Parameters

    • table: Uint8Array | Table<any>

    Returns Promise<void>

  • Loads the information associated with the class, removing any existing caches.

    Returns Promise<LoadedObject<AtlasProject, {
        access_role: "ADMIN" | "VIEWER" | "EXTERNAL" | "NONE" | "EDITOR";
        atlas_indices: {
            atoms: string[];
            colorable_fields: string[];
            created_timestamp: string;
            embedders: {
                atlas_index_id: string;
                hyperparameters: Record<string, unknown>;
                id: string;
                model_name: string;
                ready: boolean;
            }[];
            id: string;
            index_name: string;
            indexed_field: string;
            nearest_neighbor_indices: {
                atom_strategies: string[];
                hyperparameters: Record<string, unknown>;
                id: string;
                index_name: string;
                ready: boolean;
            }[];
            project_id: string;
            projections: {
                atom_strategies: string[];
                created_timestamp: string;
                hyperparameters: Record<string, unknown>;
                id: string;
                og_image?: string;
                projection_name: string;
                ready: boolean;
                thumbnail?: string;
                updated_timestamp: string;
            }[];
            updated_timestamp: string;
        }[];
        connector_details?: {
            creation_params: Record<string, unknown>;
            id: string;
        };
        connector_name?: string;
        created_timestamp: string;
        creator: string;
        creator_nickname: string;
        creator_picture: string;
        description: string;
        id: string;
        insert_update_delete_lock: boolean;
        is_public: boolean;
        is_public_to_org: boolean;
        modality?: string;
        og_image: string;
        organization_name: string;
        organization_slug: string;
        owner: string;
        permissions: {
            [key: string]: boolean;
        };
        project_fields: string[];
        project_name: string;
        schema?: string;
        slug: string;
        total_datums_in_project: number;
        unique_id_field: string;
    }>>

    a LoadedObject instance of the class that is guaranteed to have its attr slot populated with appropriate information.

    Example

    const loadedProject = await (new AtlasProject(projectId)).withLoadedAttributes()

    // OR, in cases where we want to do stuff immediately with the project and ensure
    // that later calls there don't double-fetch information.

    const project = new AtlasProject(projectId)

    // do stuff right away.
    const projection = new AtlasProjection(projectionId, {project: project})
    const loadedProjection = await projection.withLoadedAttributes()
    // do stuff with loadedProjection