Skip to content

Commit 35792c9

Browse files
authored
Fixed a documentation for SQL database connection in Kotlin Notebooks (#639)
* Fix some documentation * Fix some documentation
1 parent 4ec98c4 commit 35792c9

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/StardustDocs/topics/readSqlDatabases.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Additionally, support for JSON and date-time types is limited.
2121
Please take this into consideration when using these functions.
2222

2323

24-
## Getting started with reading from SQL database
24+
## Getting started with reading from SQL database in Gradle Project
2525

2626
In the first, you need to add a dependency
2727

@@ -81,24 +81,32 @@ val df = DataFrame.readSqlTable(dbConfig, tableName, 100)
8181
df.print()
8282
```
8383

84-
Find full example project [here](https://github.com/zaleslaw/KotlinDataFrame-SQL-Examples/).
84+
Find a full example project [here](https://github.com/zaleslaw/KotlinDataFrame-SQL-Examples/).
8585

8686
## Getting Started with Notebooks
8787

8888
To use the latest version of the Kotlin DataFrame library
89-
and a specific version of the JDBC driver for your database (MariaDB is used as an example below) in your Notebook, run the following cell.
89+
and a specific version of the JDBC driver for your database (MariaDB is used as an example below) in your Notebook,
90+
run the following two cells.
9091

91-
```
92-
%use dataframe
92+
First of all, specify the version of the JDBC driver
9393

94+
```
9495
USE {
9596
dependencies("org.mariadb.jdbc:mariadb-java-client:$version")
9697
}
9798
```
99+
Next, import `Kotlin DataFrame` library in the cell below.
100+
101+
```
102+
%use dataframe
103+
```
104+
105+
**NOTE:** The order of cell execution is important,
106+
the dataframe library is waiting for a JDBC driver to force classloading.
98107

99108
Find full example Notebook [here](https://github.com/zaleslaw/KotlinDataFrame-SQL-Examples/blob/master/notebooks/imdb.ipynb).
100109

101-
**NOTE:** The user should specify the version of the JDBC driver.
102110

103111
## Reading Specific Tables
104112

0 commit comments

Comments
 (0)