Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 0459355

Browse files
Update README.md
1 parent 1f98efd commit 0459355

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ val avgWeightByColor = vegetableDs.agg($"color", avg($"weightKg")) // The column
4444
### Python
4545
```python
4646
# Load a DataFrame from a Dynamo table. Only incurs the cost of a single scan for schema inference.
47-
dynamoDf = spark.read.format("com.audienceproject.spark.dynamodb") \
48-
.option("tableName", "SomeTableName") \
47+
dynamoDf = spark.read.option("tableName", "SomeTableName") \
48+
.format("com.audienceproject.spark.dynamodb") \
4949
.load() # <-- DataFrame of Row objects with inferred schema.
5050

5151
# Scan the table for the first 100 items (the order is arbitrary) and print them.
5252
dynamoDf.show(100)
5353

5454
# write to some other table overwriting existing item with same keys
55-
dynamoDf.write.format("com.audienceproject.spark.dynamodb") \
56-
.option("tableName", "SomeOtherTable") \
55+
dynamoDf.write.option("tableName", "SomeOtherTable") \
56+
.format("com.audienceproject.spark.dynamodb") \
5757
.save()
5858
```
5959

0 commit comments

Comments
 (0)