Method | HTTP request |
---|---|
create | POST /v2/datasets |
get | GET /v2/datasets/{datasetRid} |
read_table | GET /v2/datasets/{datasetRid}/readTable |
Creates a new Dataset. A default branch - master
for most enrollments - will be created on the Dataset.
Name | Type | Description | Notes |
---|---|---|---|
name | DatasetName | ||
parent_folder_rid | FolderRid |
Dataset
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetName |
name = "My Dataset"
# FolderRid |
parent_folder_rid = "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791"
try:
api_response = foundry_client.datasets.Dataset.create(
name=name,
parent_folder_rid=parent_folder_rid,
)
print("The create response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Dataset.create: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
200 | Dataset | The created Dataset | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Get the Dataset with the specified rid.
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid |
Dataset
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
try:
api_response = foundry_client.datasets.Dataset.get(
dataset_rid,
)
print("The get response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Dataset.get: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
200 | Dataset | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gets the content of a dataset as a table in the specified format.
This endpoint currently does not support views (virtual datasets composed of other datasets).
Name | Type | Description | Notes |
---|---|---|---|
dataset_rid | DatasetRid | datasetRid | |
format | TableExportFormat | format | |
branch_name | Optional[BranchName] | branchName | [optional] |
columns | Optional[List[str]] | columns | [optional] |
end_transaction_rid | Optional[TransactionRid] | endTransactionRid | [optional] |
row_limit | Optional[int] | rowLimit | [optional] |
start_transaction_rid | Optional[TransactionRid] | startTransactionRid | [optional] |
bytes
from foundry.v2 import FoundryClient
import foundry
from pprint import pprint
foundry_client = FoundryClient(
auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com"
)
# DatasetRid | datasetRid
dataset_rid = None
# TableExportFormat | format
format = None
# Optional[BranchName] | branchName
branch_name = None
# Optional[List[str]] | columns
columns = ["id", "firstName", "lastName"]
# Optional[TransactionRid] | endTransactionRid
end_transaction_rid = None
# Optional[int] | rowLimit
row_limit = None
# Optional[TransactionRid] | startTransactionRid
start_transaction_rid = None
try:
api_response = foundry_client.datasets.Dataset.read_table(
dataset_rid,
format=format,
branch_name=branch_name,
columns=columns,
end_transaction_rid=end_transaction_rid,
row_limit=row_limit,
start_transaction_rid=start_transaction_rid,
)
print("The read_table response:\n")
pprint(api_response)
except foundry.PalantirRPCException as e:
print("HTTP error when calling Dataset.read_table: %s\n" % e)
See README
Status Code | Type | Description | Content Type |
---|---|---|---|
200 | bytes | application/octet-stream |
[Back to top] [Back to API list] [Back to Model list] [Back to README]