astro-sdk icon indicating copy to clipboard operation
astro-sdk copied to clipboard

Expose the SQL CLI in the Astro CLI

Open tatiana opened this issue 3 years ago • 2 comments

Please describe the feature you'd like to see

One of the requirements for 0.1 is that it should be integrated into the Astro CLI.

Depends on: #828 (analysis of the method and conclusion) Depends on: #922 (spike on the candidate approaches)

Describe the solution you'd like By the end of this ticket, we should be able to run the SQL CLI features from within the Astro CLI, using the approach decided on #828

Acceptance Criteria

  • [ ] All checks and tests in the CI should pass
  • [ ] Unit tests (90% code coverage or more, once available)
  • [ ] Integration tests (if the feature relates to a new database or external service)
  • [ ] Docstrings in reStructuredText for each of the methods, classes, functions and module-level attributes (including Example DAG on how it should be used)
  • [ ] Exception handling in case of errors
  • [ ] Logging (are we exposing useful information to the user? e.g. source and destination)
  • [ ] Improve the documentation (README, Sphinx, and any other relevant)
  • [ ] How to use Guide for the feature (example)

tatiana avatar Sep 28 '22 08:09 tatiana

This involves:

  1. Having the flag for installation
  2. Having the subcommands

tatiana avatar Oct 03 '22 15:10 tatiana

Decide on how to maintain the docker image with astro-sql-cli pypi dependency installed. Write a document for listing down the pros and cons of the approaches on building the image when the pypi package is updated.

pankajkoti avatar Oct 10 '22 15:10 pankajkoti

We have an alpha release of the Astro CLI (1.7) with the SQL CLI: https://github.com/astronomer/astro-cli/releases/tag/v1.7.0

To install:

sudo bash < <(curl -sSL https://install.astronomer.io/) -s v1.7.0

tatiana avatar Oct 27 '22 23:10 tatiana

The pending work ATM is to increase the test coverage, so we are allowed to be part of the public 1.7.0 release of the Astro CLI. I suggest we add a separate ticket for this work and close the current PR, WDYT @pankajkoti and @feluelle ? If you agree, please, free to create a new ticket and associate with the 1.1 milestone.

tatiana avatar Oct 27 '22 23:10 tatiana

Yes, @tatiana The PR is merged. Created a new ticket for enhancing coverage: https://app.zenhub.com/workspaces/sql-cli-631f43da09a3a67f2c795913/issues/astronomer/astro-sdk/1153

pankajkoti avatar Oct 28 '22 08:10 pankajkoti