Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/15231
I just make this updated and manually tested the jdbc datasource with h2
database as below
with "text.json" below:
```json
{"name": "bcd"}
{"name": "abc"}
{"name": "Hyukjin"}
```
with the codes below:
```r
> df <- read.df(source="jdbc",
+ driver="org.h2.Driver",
+ url="jdbc:h2:mem:testdb0;user=testUser;password=testPass",
+ dbtable="PEOPLE")
> collect(df)
NAME
1 fred
2 mary
> jsonDF <- read.json("test.json")
> write.df(jsonDF,
+ source = "jdbc",
+ mode = "overwrite",
+ driver = "org.h2.Driver",
+ url = "jdbc:h2:mem:testdb0;user=testUser;password=testPass",
+ dbtable = "PEOPLE")
> readback <- read.df(source = "jdbc",
+ driver = "org.h2.Driver",
+ url =
"jdbc:h2:mem:testdb0;user=testUser;password=testPass",
+ dbtable = "PEOPLE")
> collect(readback)
name
1 bcd
2 abc
3 Hyukjin
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]