Metadata-Version: 2.1
Name: snowctl
Version: 1.0.7
Summary: A cli tool for automating tasks in Snowflake Database
Home-page: https://github.com/Rouhija/snowflake-cli
Author: Sami Rouhe
Author-email: rouhesami@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: snowflake-connector-python (==2.2.4)
Requires-Dist: snowflake-sqlalchemy (==1.2.3)

# Description
A cli tool for automating tasks in Snowflake Database. Mainly for copying views with column filtering at the moment.

### Installation
Install python3 (version 3.6 and higher)
- [Windows installation](https://www.python.org/downloads/release/python-385/)
- [Linux installation](https://docs.python-guide.org/starting/install3/linux/)

Use Python's pip installer to install snowctl
```sh
pip install snowctl
```

### Usage
Run in interactive mode (prompts for configuration on the first run)
```sh
snowctl
```

Optional arguments
```
usage: snowctl [-h] [-d] [-s] [-c] [-e]

optional arguments:
  -h, --help           show this help message and exit
  -d, --debug          log to console
  -s, --safe           ask for confirmation before executing copy operations
  -c, --configuration  re-input configuration values
  -e, --echo           echo configuration values
  -v, --version        display snowctl version
```

### Commands
| CMD | ACTION |
|---------|---------|
| **help** | display help |
| **use** database/schema/warehouse name | change context |
| **copy** [-d] [-f] [-r] | copy views across schemas. -d for selecting columns from source, -f for column filtering, -r for target renaming |
| **list** filter | list views in current context with an optional filter |
| **peek** view | display first row from a view |
| **sql** query | execute sql query |
| **exit** | Exit |

```
usage: copy

optional arguments:
  -h, --help    show this help message and exit
  -d, --derive  don't copy ddl, instead select columns from target view
  -f, --filter  filter columns in target views
  -r, --rename  rename target views
```

