Skip to content

Apply korro to samples in data sources#1833

Open
Allex-Nik wants to merge 3 commits into
masterfrom
data-sources-samples-korro
Open

Apply korro to samples in data sources#1833
Allex-Nik wants to merge 3 commits into
masterfrom
data-sources-samples-korro

Conversation

@Allex-Nik
Copy link
Copy Markdown
Collaborator

@Allex-Nik Allex-Nik self-assigned this Apr 29, 2026
@Allex-Nik Allex-Nik added the documentation Improvements or additions to documentation (not KDocs) label Apr 29, 2026
@Allex-Nik
Copy link
Copy Markdown
Collaborator Author

Is the package correct for the samples? Should ReadSQLDatabases be in api instead of io?

Comment thread docs/StardustDocs/topics/readSqlDatabases.md
Kotlin DataFrame can read Parquet files through Apache Arrow’s Dataset API. Learn how and when to use it.
</link-summary>

<!---IMPORT org.jetbrains.kotlinx.dataframe.samples.io.Parquet-->
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the import and applied korro, so some samples below were changed by the functions in Parquet.kt that had already existed

Comment thread docs/StardustDocs/topics/dataSources/Parquet.md
Comment thread samples/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Read.kt Outdated
Comment thread docs/StardustDocs/topics/readSqlDatabases.md Outdated
Comment thread docs/StardustDocs/topics/dataSources/Parquet.md
Comment thread docs/StardustDocs/topics/dataSources/Parquet.md
Comment thread docs/StardustDocs/topics/read.md Outdated
Comment thread docs/StardustDocs/topics/read.md Outdated
<!---FUN readJson-->

```kotlin
val df = DataFrame.readJson(file)
Copy link
Copy Markdown
Collaborator

@koperagen koperagen Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth to turn code snipper with text above into

val text = """[
{
"A": "1",
"B": 1,
"C": 1.0,
"D": true
},
{
"A": "2",
"B": 2,
"C": 1.1,
"D": null
},
{
"A": "3",
"B": 3,
"C": 1,
"D": false
},
{
"A": "4",
"B": 4,
"C": 1.3,
"D": true
}
]
"""
val df = DataFrame.readJsonStr(text)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@koperagen
Copy link
Copy Markdown
Collaborator

Tables in Manage type clashes and Column type inference from CSV could be replaced with iframes

@Allex-Nik Allex-Nik added this to the Post-RC milestone May 4, 2026
@Allex-Nik Allex-Nik force-pushed the data-sources-samples-korro branch from 655d665 to 9fe3c6d Compare May 5, 2026 13:51
@Allex-Nik
Copy link
Copy Markdown
Collaborator Author

Tables in Manage type clashes and Column type inference from CSV could be replaced with iframes

I have done it in these sections (and in some others for consistency) and also added iframes for the results where it seemed useful

@Allex-Nik Allex-Nik force-pushed the data-sources-samples-korro branch from 9fe3c6d to dedd1db Compare May 8, 2026 10:38
@Allex-Nik Allex-Nik requested a review from koperagen May 8, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation (not KDocs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants