Skip to content

Commit

Permalink
Merge pull request #20 from tablelandnetwork/bcalza/updatereadme
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
brunocalza authored Nov 14, 2023
2 parents d4ee3d1 + f366a2c commit cd610d3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [Running](#running)
- [Run tests](#run-tests)
- [Generate Cap'N Proto code](#generate-capn-proto-code)
- [Retrieving](#retrieving)

# Background

Expand Down Expand Up @@ -119,12 +120,27 @@ basin publication start --private-key [PRIVATE_KEY] namespace.relation_name
## Upload a Parquet file

Before uploading a Parquet file, you need to [Create a publication](#create-a-publication), if not already created. You can omit the `--dburi` flag, in this case.

Then, use `basin publication upload` to upload a Parquet file.

```bash
basin publication upload --name [namespace.relation_name] --private-key [PRIVATE_KEY] filepath
```

You can attach a timestamp to that file upload, e.g.

```bash
basin publication upload --name [namespace.relation_name] --private-key [PRIVATE_KEY] --timestamp 1699984703 filepath
# or use data format
basin publication upload --name [namespace.relation_name] --private-key [PRIVATE_KEY] --timestamp 2006-01-02 filepath
# or use RFC3339 format
basin publication upload --name [namespace.relation_name] --private-key [PRIVATE_KEY] --timestamp 2006-01-02T15:04:05Z07:00 filepath
```

If a timestamp is not provided, the CLI will assume the timestamp is the current client epoch in UTC.

## Listing Publications

You can list the publications from an address by running:
Expand All @@ -141,6 +157,21 @@ You can list deals of a given publication by running:
basin publication deals --publication [PUBLICATION] --latest 5
```

Deals command accept `--before`,`--after` , and `--at` flags to filter deals by timestamp

```bash
# examples
basin publication deals --publication demotest.data --at 1699569502
basin publication deals --publication demotest.data --before 2023-11-09T19:38:23-03:00
basin publication deals --publication demotest.data --after 2023-11-09
```

## Retrieving

```bash
basin publication retrieve bafybeifr5njnrw67yyb2h2t7k6ukm3pml4fgphsxeurqcmgmeb7omc2vlq
```

# Development

## Running
Expand Down

0 comments on commit cd610d3

Please sign in to comment.