Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions modules/API/pages/gsql-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2915,6 +2915,61 @@ Sample Response::
----
--
====
=== Get the sample data of local files
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
=== Get the sample data of local files
=== Get sample data from a local file

"The" is incorrect, because there is not just one possible or correct sample of data.
The data is coming from only one file, not "files"

`POST /gsql/v1/sample-data`

Get the sample data of local files
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Get the sample data of local files
Get the first N of lines of data from a local file, as a sample

"Sample" is a generic, non-specific concept. To a statistician, "sample" actually suggests that the data is chosen randomly. But I assume our selection is not random. We are selecting the first N lines. Is that correct?
We should provide a clearly explanation of how the data is chosen.


==== Parameters:

[%autowidth]
|===
| Name | Required | Description

| `path`
| yes
| local file path (`file://`).

| `size`
| no
| Number of lines to return (default: 10).
|===

==== Example

[,tabs]
====
Sample Request::
+
--
[source,bash]
----
curl -u tigergraph:tigergraph 'http://<tigergraph-host>:14240/gsql/v1/sample-data' \
-d '{
"path": "file:///path/to/local/filename",
"size": 10
}'

----
--
Sample Response::
+
--
[source.wrap,console]
----
{
"error": false,
"message": "Sample data loaded successfully",
"results": {
"file": "file:///path/to/local/filename",
"loadedRecords": 10
}
}
----
--
====



'''
=== get all files and directories under given S3 bucket path
Expand Down