You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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)"
694
694
}
695
695
],
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)"
"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)"
724
729
}
725
730
],
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
+
],
726
736
"v2.getFileContent": [
727
737
{
728
738
"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)"
"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)"
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)
[**transactions**](#transactions) | **GET** /v2/datasets/{datasetRid}/branches/{branchName}/transactions | Public Beta |
9
10
10
11
# **create**
11
12
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)
220
221
221
222
[[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)
[[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)
0 commit comments