| Method | HTTP request | Release Stage |
|---|---|---|
| abort | POST /v1/datasets/{datasetRid}/transactions/{transactionRid}/abort | Stable |
| commit | POST /v1/datasets/{datasetRid}/transactions/{transactionRid}/commit | Stable |
| create | POST /v1/datasets/{datasetRid}/transactions | Stable |
| get | GET /v1/datasets/{datasetRid}/transactions/{transactionRid} | Stable |
Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | |
| transaction_rid | TransactionRid | The Resource Identifier (RID) of the Transaction. |
Transaction
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# TransactionRid | The Resource Identifier (RID) of the Transaction.
transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496"
try:
api_response = client.datasets.Dataset.Transaction.abort(dataset_rid, transaction_rid)
print("The abort response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Transaction.abort: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Transaction | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | |
| transaction_rid | TransactionRid | The Resource Identifier (RID) of the Transaction. |
Transaction
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# TransactionRid | The Resource Identifier (RID) of the Transaction.
transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496"
try:
api_response = client.datasets.Dataset.Transaction.commit(dataset_rid, transaction_rid)
print("The commit response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Transaction.commit: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Transaction | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Creates a Transaction on a Branch of a Dataset.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction. | |
| branch_id | Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to master for most enrollments. |
[optional] |
| transaction_type | Optional[TransactionType] | [optional] |
Transaction
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset on which to create the Transaction.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# Optional[BranchId] | The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments.
branch_id = None
# Optional[TransactionType]
transaction_type = "SNAPSHOT"
try:
api_response = client.datasets.Dataset.Transaction.create(
dataset_rid, branch_id=branch_id, transaction_type=transaction_type
)
print("The create response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Transaction.create: %s\n" % e)import foundry
foundry_client = foundry.FoundryV1Client(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com")
transaction = foundry_client.datasets.Dataset.Transaction.create(
dataset_rid="...",
create_transaction_request={},
)
with open("my/path/to/file.txt", 'rb') as f:
foundry_client.datasets.Dataset.File.upload(
body=f.read(),
dataset_rid="....",
file_path="...",
transaction_rid=transaction.rid,
)
foundry_client.datasets.Dataset.Transaction.commit(dataset_rid="...", transaction_rid=transaction.rid)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Transaction | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gets a Transaction of a Dataset.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction. | |
| transaction_rid | TransactionRid | The Resource Identifier (RID) of the Transaction. |
Transaction
from foundry_sdk.v1 import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid | The Resource Identifier (RID) of the Dataset that contains the Transaction.
dataset_rid = "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
# TransactionRid | The Resource Identifier (RID) of the Transaction.
transaction_rid = "ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496"
try:
api_response = client.datasets.Dataset.Transaction.get(dataset_rid, transaction_rid)
print("The get response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Transaction.get: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Transaction | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]