Skip to content

Commit f4a632d

Browse files
Excavator: Upgrade API Version (#220)
1 parent 5148059 commit f4a632d

File tree

19 files changed

+598
-8
lines changed

19 files changed

+598
-8
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,14 @@ Namespace | Resource | Operation | HTTP request |
651651
**Datasets** | Branch | [**delete**](docs/v2/Datasets/Branch.md#delete) | **DELETE** /v2/datasets/{datasetRid}/branches/{branchName} |
652652
**Datasets** | Branch | [**get**](docs/v2/Datasets/Branch.md#get) | **GET** /v2/datasets/{datasetRid}/branches/{branchName} |
653653
**Datasets** | Branch | [**list**](docs/v2/Datasets/Branch.md#list) | **GET** /v2/datasets/{datasetRid}/branches |
654+
**Datasets** | Branch | [**transactions**](docs/v2/Datasets/Branch.md#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions |
654655
**Datasets** | Dataset | [**create**](docs/v2/Datasets/Dataset.md#create) | **POST** /v2/datasets |
655656
**Datasets** | Dataset | [**get**](docs/v2/Datasets/Dataset.md#get) | **GET** /v2/datasets/{datasetRid} |
656657
**Datasets** | Dataset | [**get_schedules**](docs/v2/Datasets/Dataset.md#get_schedules) | **GET** /v2/datasets/{datasetRid}/getSchedules |
657658
**Datasets** | Dataset | [**get_schema**](docs/v2/Datasets/Dataset.md#get_schema) | **GET** /v2/datasets/{datasetRid}/getSchema |
658659
**Datasets** | Dataset | [**put_schema**](docs/v2/Datasets/Dataset.md#put_schema) | **PUT** /v2/datasets/{datasetRid}/putSchema |
659660
**Datasets** | Dataset | [**read_table**](docs/v2/Datasets/Dataset.md#read_table) | **GET** /v2/datasets/{datasetRid}/readTable |
661+
**Datasets** | Dataset | [**transactions**](docs/v2/Datasets/Dataset.md#transactions) | **GET** /v2/datasets/{datasetRid}/transactions |
660662
**Datasets** | File | [**content**](docs/v2/Datasets/File.md#content) | **GET** /v2/datasets/{datasetRid}/files/{filePath}/content |
661663
**Datasets** | File | [**delete**](docs/v2/Datasets/File.md#delete) | **DELETE** /v2/datasets/{datasetRid}/files/{filePath} |
662664
**Datasets** | File | [**get**](docs/v2/Datasets/File.md#get) | **GET** /v2/datasets/{datasetRid}/files/{filePath} |
@@ -1203,6 +1205,8 @@ Namespace | Name | Import |
12031205
**Datasets** | [ListBranchesResponse](docs/v2/Datasets/models/ListBranchesResponse.md) | `from foundry_sdk.v2.datasets.models import ListBranchesResponse` |
12041206
**Datasets** | [ListFilesResponse](docs/v2/Datasets/models/ListFilesResponse.md) | `from foundry_sdk.v2.datasets.models import ListFilesResponse` |
12051207
**Datasets** | [ListSchedulesResponse](docs/v2/Datasets/models/ListSchedulesResponse.md) | `from foundry_sdk.v2.datasets.models import ListSchedulesResponse` |
1208+
**Datasets** | [ListTransactionsOfDatasetResponse](docs/v2/Datasets/models/ListTransactionsOfDatasetResponse.md) | `from foundry_sdk.v2.datasets.models import ListTransactionsOfDatasetResponse` |
1209+
**Datasets** | [ListTransactionsResponse](docs/v2/Datasets/models/ListTransactionsResponse.md) | `from foundry_sdk.v2.datasets.models import ListTransactionsResponse` |
12061210
**Datasets** | [PrimaryKeyLatestWinsResolutionStrategy](docs/v2/Datasets/models/PrimaryKeyLatestWinsResolutionStrategy.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyLatestWinsResolutionStrategy` |
12071211
**Datasets** | [PrimaryKeyResolutionDuplicate](docs/v2/Datasets/models/PrimaryKeyResolutionDuplicate.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionDuplicate` |
12081212
**Datasets** | [PrimaryKeyResolutionStrategy](docs/v2/Datasets/models/PrimaryKeyResolutionStrategy.md) | `from foundry_sdk.v2.datasets.models import PrimaryKeyResolutionStrategy` |
@@ -1784,6 +1788,7 @@ Namespace | Name | Import |
17841788
**Core** | [FilePath](docs/v1/Core/models/FilePath.md) | `from foundry_sdk.v1.core.models import FilePath` |
17851789
**Core** | [FloatType](docs/v1/Core/models/FloatType.md) | `from foundry_sdk.v1.core.models import FloatType` |
17861790
**Core** | [FolderRid](docs/v1/Core/models/FolderRid.md) | `from foundry_sdk.v1.core.models import FolderRid` |
1791+
**Core** | [FoundryBranch](docs/v1/Core/models/FoundryBranch.md) | `from foundry_sdk.v1.core.models import FoundryBranch` |
17871792
**Core** | [IntegerType](docs/v1/Core/models/IntegerType.md) | `from foundry_sdk.v1.core.models import IntegerType` |
17881793
**Core** | [LongType](docs/v1/Core/models/LongType.md) | `from foundry_sdk.v1.core.models import LongType` |
17891794
**Core** | [MarkingType](docs/v1/Core/models/MarkingType.md) | `from foundry_sdk.v1.core.models import MarkingType` |
@@ -2115,6 +2120,7 @@ Namespace | Name | Import |
21152120
**Core** | ApiUsageDenied | `from foundry_sdk.v2.core.errors import ApiUsageDenied` |
21162121
**Core** | BatchRequestSizeExceededLimit | `from foundry_sdk.v2.core.errors import BatchRequestSizeExceededLimit` |
21172122
**Core** | FolderNotFound | `from foundry_sdk.v2.core.errors import FolderNotFound` |
2123+
**Core** | FoundryBranchNotFound | `from foundry_sdk.v2.core.errors import FoundryBranchNotFound` |
21182124
**Core** | InvalidAndFilter | `from foundry_sdk.v2.core.errors import InvalidAndFilter` |
21192125
**Core** | InvalidChangeDataCaptureConfiguration | `from foundry_sdk.v2.core.errors import InvalidChangeDataCaptureConfiguration` |
21202126
**Core** | InvalidFieldSchema | `from foundry_sdk.v2.core.errors import InvalidFieldSchema` |
@@ -2152,6 +2158,7 @@ Namespace | Name | Import |
21522158
**Datasets** | FileNotFound | `from foundry_sdk.v2.datasets.errors import FileNotFound` |
21532159
**Datasets** | FileNotFoundOnBranch | `from foundry_sdk.v2.datasets.errors import FileNotFoundOnBranch` |
21542160
**Datasets** | FileNotFoundOnTransactionRange | `from foundry_sdk.v2.datasets.errors import FileNotFoundOnTransactionRange` |
2161+
**Datasets** | GetBranchTransactionHistoryPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetBranchTransactionHistoryPermissionDenied` |
21552162
**Datasets** | GetDatasetSchedulesPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchedulesPermissionDenied` |
21562163
**Datasets** | GetDatasetSchemaPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetDatasetSchemaPermissionDenied` |
21572164
**Datasets** | GetFileContentPermissionDenied | `from foundry_sdk.v2.datasets.errors import GetFileContentPermissionDenied` |
@@ -2469,6 +2476,7 @@ Namespace | Name | Import |
24692476
**Core** | ApiFeaturePreviewUsageOnly | `from foundry_sdk.v1.core.errors import ApiFeaturePreviewUsageOnly` |
24702477
**Core** | ApiUsageDenied | `from foundry_sdk.v1.core.errors import ApiUsageDenied` |
24712478
**Core** | FolderNotFound | `from foundry_sdk.v1.core.errors import FolderNotFound` |
2479+
**Core** | FoundryBranchNotFound | `from foundry_sdk.v1.core.errors import FoundryBranchNotFound` |
24722480
**Core** | InvalidPageSize | `from foundry_sdk.v1.core.errors import InvalidPageSize` |
24732481
**Core** | InvalidPageToken | `from foundry_sdk.v1.core.errors import InvalidPageToken` |
24742482
**Core** | InvalidParameterCombination | `from foundry_sdk.v1.core.errors import InvalidParameterCombination` |

docs-snippets-npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"sls": {
2525
"dependencies": {
2626
"com.palantir.foundry.api:api-gateway": {
27-
"minVersion": "1.1247.0",
27+
"minVersion": "1.1249.0",
2828
"maxVersion": "1.x.x",
2929
"optional": false
3030
}

docs-snippets-npm/src/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,11 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets<typeof PLATFORM_API_DOCS_SPEC
693693
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.list(\n dataset_rid, page_size=page_size, page_token=page_token\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.list: %s\\n\" % e)"
694694
}
695695
],
696+
"v2.getBranchTransactionHistory": [
697+
{
698+
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# BranchName\nbranch_name = None\n# Optional[PageSize]\npage_size = None\n# Optional[PageToken]\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for branch in client.datasets.Dataset.Branch.transactions(\n dataset_rid, branch_name, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(branch)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Branch.transactions: %s\\n\" % e)"
699+
}
700+
],
696701
"v2.createDataset": [
697702
{
698703
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetName\nname = \"My Dataset\"\n# FolderRid\nparent_folder_rid = \"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791\"\n\n\ntry:\n api_response = client.datasets.Dataset.create(name=name, parent_folder_rid=parent_folder_rid)\n print(\"The create response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.create: %s\\n\" % e)"
@@ -723,6 +728,11 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets<typeof PLATFORM_API_DOCS_SPEC
723728
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# TableExportFormat | The export format. Must be `ARROW` or `CSV`.\nformat = None\n# Optional[BranchName] | The name of the Branch.\nbranch_name = None\n# Optional[List[str]] | A subset of the dataset columns to include in the result. Defaults to all columns.\ncolumns = [\"id\", \"firstName\", \"lastName\"]\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[int] | A limit on the number of rows to return. Note that row ordering is non-deterministic.\nrow_limit = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.read_table(\n dataset_rid,\n format=format,\n branch_name=branch_name,\n columns=columns,\n end_transaction_rid=end_transaction_rid,\n row_limit=row_limit,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The read_table response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.read_table: %s\\n\" % e)"
724729
}
725730
],
731+
"v2.listTransactionsOfDataset": [
732+
{
733+
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# Optional[PageSize] | The page size to use for the endpoint.\npage_size = None\n# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.\npage_token = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n for dataset in client.datasets.Dataset.transactions(\n dataset_rid, page_size=page_size, page_token=page_token, preview=preview\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.transactions: %s\\n\" % e)"
734+
}
735+
],
726736
"v2.getFileContent": [
727737
{
728738
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# DatasetRid\ndataset_rid = None\n# FilePath\nfile_path = None\n# Optional[BranchName] | The name of the Branch that contains the File. Defaults to `master` for most enrollments.\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction.\nend_transaction_rid = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the start Transaction.\nstart_transaction_rid = None\n\n\ntry:\n api_response = client.datasets.Dataset.File.content(\n dataset_rid,\n file_path,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n start_transaction_rid=start_transaction_rid,\n )\n print(\"The content response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling File.content: %s\\n\" % e)"
@@ -1390,7 +1400,7 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets<typeof PLATFORM_API_DOCS_SPEC
13901400
],
13911401
"v2.executeSqlQuery": [
13921402
{
1393-
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# str | The SQL query to execute. Queries should confirm to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Refer the following [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) on the supported syntax for referencing datasets in SQL queries.\nquery = \"SELECT * FROM `/Path/To/Dataset`\"\n# Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments.\nfallback_branch_ids = [\"master\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.execute(\n query=query, fallback_branch_ids=fallback_branch_ids, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.execute: %s\\n\" % e)"
1403+
"template": "from foundry_sdk import FoundryClient\nimport foundry_sdk\nfrom pprint import pprint\n\nclient = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname=\"example.palantirfoundry.com\")\n\n# str | The SQL query to execute. Queries should conform to the [Spark SQL dialect](https://spark.apache.org/docs/latest/sql-ref.html). This supports SELECT queries only. Refer the following [documentation](https://www.palantir.com/docs/foundry/analytics-connectivity/odbc-jdbc-drivers/#use-sql-to-query-foundry-datasets) on the supported syntax for referencing datasets in SQL queries.\nquery = \"SELECT * FROM `/Path/To/Dataset`\"\n# Optional[List[BranchName]] | The list of branch ids to use as fallbacks if the query fails to execute on the primary branch. If a is not explicitly provided in the SQL query, the resource will be queried on the first fallback branch provided that exists. If no fallback branches are provided the default branch is used. This is `master` for most enrollments.\nfallback_branch_ids = [\"master\"]\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n\n\ntry:\n api_response = client.sql_queries.SqlQuery.execute(\n query=query, fallback_branch_ids=fallback_branch_ids, preview=preview\n )\n print(\"The execute response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling SqlQuery.execute: %s\\n\" % e)"
13941404
}
13951405
],
13961406
"v2.getResultsSqlQuery": [
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# FoundryBranch
2+
3+
The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.
4+
5+
## Type
6+
```python
7+
str
8+
```
9+
10+
11+
[[Back to Model list]](../../../../README.md#models-v1-link) [[Back to API list]](../../../../README.md#apis-v1-link) [[Back to README]](../../../../README.md)

docs/v2/Datasets/Branch.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Release Stage |
66
[**delete**](#delete) | **DELETE** /v2/datasets/{datasetRid}/branches/{branchName} | Stable |
77
[**get**](#get) | **GET** /v2/datasets/{datasetRid}/branches/{branchName} | Stable |
88
[**list**](#list) | **GET** /v2/datasets/{datasetRid}/branches | Stable |
9+
[**transactions**](#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions | Public Beta |
910

1011
# **create**
1112
Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction.
@@ -220,3 +221,64 @@ See [README](../../../README.md#authorization)
220221

221222
[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)
222223

224+
# **transactions**
225+
Get the Transaction history for the given Dataset
226+
227+
228+
### Parameters
229+
230+
Name | Type | Description | Notes |
231+
------------- | ------------- | ------------- | ------------- |
232+
**dataset_rid** | DatasetRid | | |
233+
**branch_name** | BranchName | | |
234+
**page_size** | Optional[PageSize] | | [optional] |
235+
**page_token** | Optional[PageToken] | | [optional] |
236+
**preview** | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
237+
238+
### Return type
239+
**ListTransactionsResponse**
240+
241+
### Example
242+
243+
```python
244+
from foundry_sdk import FoundryClient
245+
import foundry_sdk
246+
from pprint import pprint
247+
248+
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
249+
250+
# DatasetRid
251+
dataset_rid = None
252+
# BranchName
253+
branch_name = None
254+
# Optional[PageSize]
255+
page_size = None
256+
# Optional[PageToken]
257+
page_token = None
258+
# Optional[PreviewMode] | Enables the use of preview functionality.
259+
preview = None
260+
261+
262+
try:
263+
for branch in client.datasets.Dataset.Branch.transactions(
264+
dataset_rid, branch_name, page_size=page_size, page_token=page_token, preview=preview
265+
):
266+
pprint(branch)
267+
except foundry_sdk.PalantirRPCException as e:
268+
print("HTTP error when calling Branch.transactions: %s\n" % e)
269+
270+
```
271+
272+
273+
274+
### Authorization
275+
276+
See [README](../../../README.md#authorization)
277+
278+
### HTTP response details
279+
| Status Code | Type | Description | Content Type |
280+
|-------------|-------------|-------------|------------------|
281+
**200** | ListTransactionsResponse | | application/json |
282+
283+
[[Back to top]](#) [[Back to API list]](../../../README.md#apis-v2-link) [[Back to Model list]](../../../README.md#models-v2-link) [[Back to README]](../../../README.md)
284+

0 commit comments

Comments
 (0)