Skip to content

Commit 993c674

Browse files
Parquet encryption code markdown fix
1 parent 3724151 commit 993c674

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

parquet-encryption-on-hive-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The following examples show you how you can use Parquet encryption on data saved
6868
```python
6969
ACCESS_TOKEN = "A valid IAM access token"
7070
KEY_PROTECT_INSTANCE_ID = "My KP instance ID"
71-
K1 = d1ae3fc2-6b7d-4a03-abb6-644e02933734
71+
K1 = "d1ae3fc2-6b7d-4a03-abb6-644e02933734"
7272
K2 = "c4a21521-2a78-4968-a7c2-57c481f58d5c"
7373

7474
# setup key protect on the hadoop configuration

parquet-encryption.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following optional parameters can be used when writing encrypted data:
100100
The following sample code snippets for Python and Scala show how to create data frames, written to encrypted parquet files, and read from encrypted parquet files.
101101
102102
- Python: Writing encrypted data
103-
```
103+
```python
104104
from pyspark.sql import Row
105105
106106
squaresDF = spark.createDataFrame(
@@ -117,7 +117,7 @@ from pyspark.sql import Row
117117
squaresDF.write.parquet(encryptedParquetPath)
118118
```
119119
- Python: Reading encrypted data
120-
```
120+
```python
121121
sc._jsc.hadoopConfiguration().set("encryption.key.list",
122122
"key1: AAECAwQFBgcICQoLDA0ODw==, key2: AAECAAECAAECAAECAAECAA==")
123123

@@ -126,7 +126,7 @@ sc._jsc.hadoopConfiguration().set("encryption.key.list",
126126
parquetFile.show()
127127
```
128128
- Scala: Writing encrypted data
129-
```
129+
```scala
130130
case class SquareItem(int_column: Int, square_int_column: Double)
131131
val dataRange = (1 to 6).toList
132132
val squares = sc.parallelize(
@@ -141,7 +141,7 @@ sc._jsc.hadoopConfiguration().set("encryption.key.list",
141141
squares.toDS().write.parquet(encryptedParquetPath)
142142
```
143143
- Scala: Reading encrypted data
144-
```
144+
```scala
145145
sc.hadoopConfiguration.set("encryption.key.list",
146146
"key1: AAECAwQFBgcICQoLDA0ODw==, key2: AAECAAECAAECAAECAAECAA==")
147147
val encryptedParquetPath = "squares.parquet.encrypted"

0 commit comments

Comments
 (0)