A Bash-based CLI for the Altertable Lakehouse API.
bash(4.0+)curljq(optional but recommended for pretty-printing and robust JSON handling)
Clone the repository and add the bin directory to your PATH, or copy the script:
cp bin/altertable /usr/local/bin/altertable
chmod +x /usr/local/bin/altertableSet the following environment variables for authentication:
export ALTERTABLE_USERNAME="your-username"
export ALTERTABLE_PASSWORD="your-password"
# Or use a pre-encoded token
# export ALTERTABLE_BASIC_AUTH_TOKEN="base64-token"altertable query --statement "SELECT * FROM users LIMIT 10"# Append a single record
altertable append --catalog my_cat --schema public --table users --data '{"id": 1, "name": "Alice"}'
# Append a batch of records
altertable append --catalog my_cat --schema public --table users --data '[{"id": 2, "name": "Bob"}, {"id": 3, "name": "Charlie"}]'
# Append from a file
altertable append --catalog my_cat --schema public --table users --data @records.jsonaltertable upload \
--catalog my_cat \
--schema public \
--table users \
--format csv \
--mode append \
--file data.csvaltertable get-query "query-uuid"altertable cancel --query-id "query-uuid" --session-id "session-uuid"altertable validate --statement "SELECT * FROM users"MIT