joewood / react-iceberg

React Components to visualize Apache Iceberg tables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Iceberg

A set of React components to visualize Apache Iceberg Tables.

Screenshot

Usage

NOTE - this component is very much experimental

$ npm install react-iceberg

The component includes the S3 client library, used to access the metadata and manifests in the Apache Iceberg table. This data is loaded using a React Hook.

import { IcebergMetadata, IcebergTableUpdated, useMetadata } from "react-iceberg";

const options = {
    accessKeyId: /** S3 Access Key ID */,
    secretAccessKey: /** Secret Access key */,
    // TODO: this should be able to use the proxy (window.location.origin)
    endpoint: /** S3 APi Endpoint */,
}

const Component: FC = () => {
    const { metadata, error, options } = useMetadata(
        "catalog" /** name of the S3 Bucket */,
        options);

    return <IcebergTableUpdated table={metadata} options={options} />

    return <IcebergMetadata schema={metadata.schema} />}
}

Development

These components are in the early stages of development. The repository includes the configuration for a VSCode Development Container. The pre-requisites for development are. It's highly recommended to use the preconfigured dev container environment. Please install Docker, use WSL2 for Windows with Docker for WSL2 enabled.

The dev container environment provides the following:

  • Apache Spark container with a single master running in local mode, this includes the Apache Iceberg libraries and configured catalog
  • A Minio Container providing an S3 compatible service
  • An init-container that runs setup script configuring the S3 based environment
  • Create React App test application for development inside the containerized environment

The Apache Iceberg catalog and table is created using the create-test-table.py script, this is submitted using the following command:

$ spark-submit create-test-table.py

Contributions

  • Joe Wood
  • Yves-Noel

About

React Components to visualize Apache Iceberg tables


Languages

Language:TypeScript 47.3%Language:Shell 33.7%Language:Jupyter Notebook 7.8%Language:Dockerfile 4.6%Language:Python 4.1%Language:JavaScript 2.0%Language:HTML 0.6%