- Improve error messages
- Show simple success message instead of a JSON object
- Improve "configure" command help message
- Fixed CSV output printing the headers more than once
- Yet another try to fix the brew formula (link to GitHub release was broken)
- Fixed brew formula to use python 3.10
- Don't allow to run queries on the authentication API, which is not suitable for that.
- Make all arguments optional on every command.
- Add AUTH_API_URL environment variable to be able to configure the authentication API URL in different environments.
- Require --force flag to overwrite an existing profile.
- Display help message when trying a command without arguments.
- Increase timeout in
executecommand from 10s to 30s. - Remove redundant flags in
executecommand: dry-run & ignore-errors.
- Removed the option to execute more than one SQL statement at a time for robustness. It's still possible to execute multiple statements by calling the
upsolvercommand multiple times.
- Refactor
configureandexecutecommands. - Remove support from legacy commands.
- Fixed brew formula to also use python 3.8.
- Poetry: Upgrade version.
- Fixed a bug where executing long statements fails on unexpected error.
- Minor bug fixes
- Changed
thisthing
- csv output format now flattens complex objects (object 'a' with nested objected 'b' will show up as "a.b" column).
- csv output columns are now sorted alphabetically.
-
removed
exportoption forclusterssub-command. -
fixed a bug related to CSV output formatting.
-
--versionnow shows correct version
-
lssub-commands now return "raw" responses from the API. Prior to this the responses were converted to simplified objects, which missed a lot of info. These simplified objects are still used in thestatsscreens but need some work to show useful info. -
executesub-command now has a timeout flag--timeoutor-t: it controls how much time the CLI should wait for results (of pending responses) to become ready. This timeout settings is per statement. -
Added
InvalidOptionErrthat will now be thrown when users pass invalid option values (e.g. badly formatted time value for the timeout setting).
-
Improved error messages.
-
Passing the
--debugflag to the CLI will now print the full stacktrace in case of an error (previously only log statements were shown). -
Implemented
exportsub-commands forcatalogsandjobs(note:jobs exportrequires a job ID, and will not work with a job's name).
- File paths are now supported. Now you have two options for executing script files:
$ upsolver execute commands.sql
$ cat commands.sql | upsolver execute -
- Execution of multiple statements now outputs "markers" that separate results of different queries. With this you can use other tools to parse the results and attribute them to specific queries. Example output:
$ upsolver execute "SELECT COUNT(*) FROM Athena.prod.files; SELECT * FROM Athena.prod.files limit 1;"
{
"marker": "execution_start",
"query": "SELECT COUNT(*) FROM Athena.prod.files;"
}
{
"_col0": "15"
}
{
"marker": "execution_start",
"query": "SELECT * FROM Athena.prod.files limit 2;"
}
{
<json doc>
}
{
<json doc>
}
- Support for a "silent" flag (
-sor--ignore-erros) which ignores errors. If this flag is passed toexecuteit will not stop execution on failed queries. This is useful for scripts where you have queries that are expected to fail (e.g. creating a table that already exists, or deleting a job that doesn't exist). Example:
Without silent flag:
$ upsolver execute "DROP TABLE Athena.prod.doesntexist; SELECT * from Athena.prod.files limit 1;"
{
"marker": "execution_start",
"query": "DROP TABLE Athena.prod.doesntexist;"
}
API Error [status_code=400, request_id=6b400c82-3427-417c-9b0a-695d9ad4c101]: Table Athena.prod.doesntexist was not found
With silent flag:
$ upsolver execute -s "DROP TABLE Athena.prod.doesntexist; SELECT * from Athena.prod.files limit 1;"
{
"marker": "execution_start",
"query": "DROP TABLE Athena.prod.doesntexist;"
}
{
"query": "DROP TABLE Athena.prod.doesntexist;",
"error": "API Error [status_code=400, request_id=c3c044ed-fb1f-4ce3-a619-25e0fa9fd6da]: Table Athena.prod.doesntexist was not found"
}
{
"marker": "execution_start",
"query": "SELECT * from Athena.prod.files limit 1;"
}
{
<json doc>
}
- Fixed
executesub-command to handle nonSELECTstatements correctly. - Fixed a bug where the execution of a query would buffer the entire result before outputting it; now the CLI outputs whatever results are available immediately.