Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danishi committed Jul 9, 2024
1 parent 64a75df commit b2ff887
Showing 1 changed file with 45 additions and 28 deletions.
73 changes: 45 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,34 +71,34 @@ optional arguments:
<details>
<summary>Setup and install</summary>

```shell
$ python -m venv venv
$ . venv/bin/activate
$ python setup.py install
$ dynamodb-csv -h
```

Or

```shell
$ python -m venv venv
$ . venv/bin/activate
$ pip install -r requirements-dev.txt
$ export PYTHONPATH=`pwd`
$ python app/main.py -h
```

For Windows

```shell
> python -m venv venv
> venv\Scripts\activate
> pip install -r requirements-dev.txt
> set PYTHONPATH=%cd%
> python app/main.py -h
```

Or you can use devcontainer.
```shell
$ python -m venv venv
$ . venv/bin/activate
$ python setup.py install
$ dynamodb-csv -h
```

Or

```shell
$ python -m venv venv
$ . venv/bin/activate
$ pip install -r requirements-dev.txt
$ export PYTHONPATH=`pwd`
$ python app/main.py -h
```

For Windows

```shell
> python -m venv venv
> venv\Scripts\activate
> pip install -r requirements-dev.txt
> set PYTHONPATH=%cd%
> python app/main.py -h
```

Or you can use devcontainer.

</details>

Expand Down Expand Up @@ -175,6 +175,23 @@ DecimalListValues=DL
DecimalSetValues=DS
```

The CSV_SPEC type is mapped to the [DynamoDB attribute type](https://docs.aws.amazon.com/en_us/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypeDescriptors) in this way.

| CSV_SPEC | DynamoDB attribute data type | example value |
| :--------------: | :--------------------------: | :---------------------------------------------- |
| String : S | String | `foo` |
| Integer : I | Number | `1` |
| Decimal : D | Number | `1.23` |
| Boolean : B | Boolean | `TRUE` |
| Json : J | Map | `[{""string"" : ""value""},{""number"" : 100}]` |
| StringList : SL | List | `foo bar baz` |
| StringSet : SS | String Set | `foo bar baz` |
| DecimalList : DL | List | `10 10.1 20` |
| DecimalSet : DS | Number Set | `10 10.1 20` |

Sorry, Binary type and Binary Set type is not supported.
Null type, look [here](https://github.com/danishi/dynamodb-csv?tab=readme-ov-file#import-options).

### Create DynamoDB table

> [!NOTE]
Expand Down

0 comments on commit b2ff887

Please sign in to comment.