| Method | HTTP request | Release Stage |
|---|---|---|
| abort | POST /v2/datasets/{datasetRid}/transactions/{transactionRid}/abort | Stable |
| build | GET /v2/datasets/{datasetRid}/transactions/{transactionRid}/build | Private Beta |
| commit | POST /v2/datasets/{datasetRid}/transactions/{transactionRid}/commit | Stable |
| create | POST /v2/datasets/{datasetRid}/transactions | Stable |
| get | GET /v2/datasets/{datasetRid}/transactions/{transactionRid} | Stable |
| job | GET /v2/datasets/{datasetRid}/transactions/{transactionRid}/job | Private Beta |
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 | ||
| transaction_rid | TransactionRid |
Transaction
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid
dataset_rid = None
# TransactionRid
transaction_rid = None
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]
Get the Build that computed the given Transaction. Not all Transactions have an associated Build. For example, if a Dataset is updated by a User uploading a CSV file into the browser, no Build will be tied to the Transaction.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | ||
| transaction_rid | TransactionRid | ||
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
Optional[BuildRid]
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid
dataset_rid = None
# TransactionRid
transaction_rid = None
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
api_response = client.datasets.Dataset.Transaction.build(
dataset_rid, transaction_rid, preview=preview
)
print("The build response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Transaction.build: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Optional[BuildRid] | 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 | ||
| transaction_rid | TransactionRid |
Transaction
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid
dataset_rid = None
# TransactionRid
transaction_rid = None
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 | ||
| transaction_type | TransactionType | ||
| branch_name | Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to master for most enrollments. |
[optional] |
Transaction
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid
dataset_rid = None
# TransactionType
transaction_type = "APPEND"
# Optional[BranchName] | The name of the Branch on which to create the Transaction. Defaults to `master` for most enrollments.
branch_name = None
try:
api_response = client.datasets.Dataset.Transaction.create(
dataset_rid, transaction_type=transaction_type, branch_name=branch_name
)
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.FoundryV2Client(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 | The created 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 | ||
| transaction_rid | TransactionRid |
Transaction
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid
dataset_rid = None
# TransactionRid
transaction_rid = None
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]
Get the Job that computed the given Transaction. Not all Transactions have an associated Job. For example, if a Dataset is updated by a User uploading a CSV file into the browser, no Job will be tied to the Transaction.
| Name | Type | Description | Notes |
|---|---|---|---|
| dataset_rid | DatasetRid | ||
| transaction_rid | TransactionRid | ||
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
Optional[JobRid]
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# DatasetRid
dataset_rid = None
# TransactionRid
transaction_rid = None
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
api_response = client.datasets.Dataset.Transaction.job(
dataset_rid, transaction_rid, preview=preview
)
print("The job response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling Transaction.job: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | Optional[JobRid] | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]