Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
orellabac authored Dec 1, 2022
1 parent 3281870 commit 4cc3e00
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

Snowpark by itself is a powerful library, but still some utility functions can always help.




# Installation

We recommended installing using [PYPI](https://pypi.org/)

```bash

$ pip install snowconvert-deploy-tool --upgrade
```
> note:: If you run this command on MacOS change `pip` by `pip3`

# Usage


just import it at the top of your file and it will automatically extend your snowpark package.
For example:
``` python
from snowflake.snowpark import Session
import snowpark_extensions
new_session = Session.builder.from_snowsql().appName("app1").getOrCreate()
```
```
## Currently provided extensions:
## SessionBuilder extensions
Expand Down Expand Up @@ -204,6 +230,7 @@ df.select(F.array_sort(df.data, asc=False)).show()

### regexp_extract

```python
session = Session.builder.from_snowsql().create()


Expand Down Expand Up @@ -238,6 +265,7 @@ df.select(F.regexp_extract('id', r'(\d+)_(\d+)', 2)).show()
# |30 |
# |50 |
# ------------------------------------------------------
```

# utilities

Expand All @@ -246,8 +274,6 @@ df.select(F.regexp_extract('id', r'(\d+)_(\d+)', 2)).show()
| utils.map_to_python_type | maps from DataType to python type |
|

## Usage:

just import it at the top of your file and it will automatically extend your snowpark package


0 comments on commit 4cc3e00

Please sign in to comment.