Skip to content

View data

This page describes how to describe and show the details of data objects in Deep Origin. To simply list objects, see List data.

Describe data

Describe rows

Describing rows provides metadata about the row, such as its ID, parent, and status.

Describe vs. Show

This does not show you information in that row. To see data contained in that row, use the show command.

To describe a row in a database in Deep Origin, run:

deeporigin data describe <row-id>

This will display a table similar to:

╭──────────────────┬────────────────────────────────────╮
│ Column           │ Value                              │
├──────────────────┼────────────────────────────────────┤
│ id               │ _row:WORR9xeGvG6mSg0yyDRlk         │
│ parentId         │ _database:kyEws11L4KagGAaqRwONv    │
│ type             │ row                                │
│ dateCreated      │ 2024-05-08 17:59:32.512306         │
│ dateUpdated      │ 2024-05-08 18:08:13.103            │
│ createdByUserDrn │ scientist@deeporigin.com           │
│ editedByUserDrn  │ scientist@deeporigin.com           │
│ hid              │ data-2                             │
│ validationStatus │ valid                              │
╰──────────────────┴────────────────────────────────────╯
JSON output with --json

JSON output can be requested by adding --json, and allows you to pipe out to a JSON processor like jq:

deeporigin data describe <row-id> --json | jq
{
  "id": "_row:WORR9xeGvG6mSg0yyDRlk",
  "parentId": "_database:kyEws11L4KagGAaqRwONv",
  "type": "row",
  "dateCreated": "2024-05-08 17:59:32.512306",
  "dateUpdated": "2024-05-08 18:08:13.103",
  "createdByUserDrn": "scientist@deeporigin.com",
  "editedByUserDrn": "scientist@deeporigin.com",
  "hid": "data-2",
  "validationStatus": "valid"
}
from deeporigin.data_hub import api
api.describe_row("_row:WORR9xeGvG6mSg0yyDRlk")

Describe files

To describe a file in a database in Deep Origin, run:

deeporigin data describe <file-id>

This will display a table similar to:

╭──────────────────┬───────────────────────────────────╮
│ Property         │ Value                             │
├──────────────────┼───────────────────────────────────┤
│ id               │ _file:gBAK9tzFC5Cegx4NmSETc       │
│ uri              │ s3://_file:gBAK9tzFC5Cegx4NmSETc  │
│ name             │ db-dna.csv                        │
│ status           │ ready                             │
│ contentLength    │ 234                               │
│ contentType      │ text/csv                          │
│ dateCreated      │ 2024-05-08 01:01:48.925           │
│ dateUpdated      │ 2024-05-08 01:01:48.925           │
│ createdByUserDrn │ scientist@deeporigin.com          │
╰──────────────────┴───────────────────────────────────╯
JSON output with --json

JSON output can be requested by adding --json, and allows you to pipe out to a JSON processor like jq:

deeporigin data describe <file-id> --json | jq
{
  "id": "_file:gBAK9tzFC5Cegx4NmSETc",
  "uri": "s3://_file:gBAK9tzFC5Cegx4NmSETc",
  "name": "db-dna.csv",
  "status": "ready",
  "contentLength": 234,
  "contentType": "text/csv",
  "dateCreated": "2024-05-08 01:01:48.925",
  "dateUpdated": "2024-05-08 01:01:48.925",
  "createdByUserDrn": "scientist@deeporigin.com"
}
from deeporigin.data_hub import api
api.describe_file("file-id")

Show data

Show rows

To show the data in a row in a database in Deep Origin, run:

deeporigin data show <row-id>

This will display a table similar to:

╭───────────┬─────────────────────────────╮
│ Column    │ Value                       │
├───────────┼─────────────────────────────┤
│ File      │ _file:hnU7F62xeW8j0l1kR7YP1 │
│ Float Num │ 112                         │
│ selctcol  │ sdsd                        │
╰───────────┴─────────────────────────────╯
JSON output with --json

JSON output can be requested by adding --json, and allows you to pipe out to a JSON processor like jq:

deeporigin data describe <file-id> --json | jq
{
  "File": "_file:hnU7F62xeW8j0l1kR7YP1",
  "Float Num": 112,
  "selctcol": "sdsd"
}
from deeporigin.data_hub import  api
api.get_row_data("row-id")

The data will be returned as a dictionary, where the keys are the column names and the values are values of the cells.

Show databases

deeporigin data show <database-id>

This will display a table similar to:

╭───────────┬───────────┬──────────────────┬────────────┬───────────────────╮
│  Status   │ stag-id   │ Customer Name    │ Status     │  Output Files     │
├───────────┼───────────┼──────────────────┼────────────┼───────────────────┤
│ valid     │ stag-1    │ Blue Sun Corp    │ Processing │                   │
│ valid     │ stag-2    │ Veridian Dynamics│ Complete   │   report.tar.gz   │
╰───────────┴───────────┴──────────────────┴────────────┴───────────────────╯
JSON output with --json

JSON output can be requested by adding --json, and allows you to pipe out to a JSON processor like jq:

deeporigin data describe <database-id> --json | jq
{
  "Status": [
    "valid",
    "valid"
  ],
  "stag-id": [
    "stag-1",
    "stag-2"
  ],
  "Customer Name": [
    "Blue Sun Corp ",
    "Veridian Dynamics"
  ],
  "Status": [
    "Processing",
    "Complete"
  ],
  "Output Files": [
    null,
    "report.tar.gz"
  ]
}
from deeporigin.data_hub import api
api.get_dataframe("database-id")

The data will be returned as a Pandas DataFrame.