Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhangyuan/holo-cli
CLI for Hologres
https://github.com/zhangyuan/holo-cli
Last synced: 21 days ago
JSON representation
CLI for Hologres
- Host: GitHub
- URL: https://github.com/zhangyuan/holo-cli
- Owner: zhangyuan
- License: mit
- Created: 2024-07-03T06:55:26.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-03T06:58:13.000Z (6 months ago)
- Last Synced: 2024-11-03T14:59:36.869Z (2 months ago)
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# holo-cli
## Usage
### Generate Create Table DDL from schema definition in YAML
```bash
./holo-cli schema2ddl -s examples/users.yaml -o tmp/users.sql
```### COPY CSV file to Hologres
`COPY` to Hologres with the default option `DELIMITER ',', FORMAT CSV, HEADER true`:
```bash
./holo-cli copyFromCsv -c tmp/users.csv -s public -t users --options
```Or specify `COPY` command's options:
```bash
./holo-cli copyFromCsv -c tmp/users.csv -s public -t users --options "DELIMITER ',', FORMAT CSV, HEADER true, STREAM_MODE TRUE, ON_CONFLICT UPDATE"
```### COPY SQL query result to local file
`COPY` from hologres to local file with the default option `DELIMITER ',', FORMAT CSV, HEADER true`:
```bash
./holo-cli copyToLocal -q "select * from users" -o tmp/file.csv
```Or specify `COPY` command's options:
```bash
./holo-cli copyToLocal -q "select * from users" -o tmp/file.text --options "FORMAT TEXT"
```