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[BranchName] | The name of the Branch. If none is provided, the default Branch name - `master` for most enrollments - will be used.\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 dataset in client.datasets.Dataset.get_schedules(\n dataset_rid,\n branch_name=branch_name,\n page_size=page_size,\n page_token=page_token,\n preview=preview,\n ):\n pprint(dataset)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schedules: %s\\n\" % e)"
689
689
}
690
690
],
691
+
"v2.getDatasetSchema": [
692
+
{
693
+
"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[BranchName]\nbranch_name = None\n# Optional[TransactionRid] | The Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used.\nend_transaction_rid = None\n# Optional[PreviewMode] | Enables the use of preview functionality.\npreview = None\n# Optional[VersionId] | The schema version that should be used. If none is provided, the latest version will be used.\nversion_id = None\n\n\ntry:\n api_response = client.datasets.Dataset.get_schema(\n dataset_rid,\n branch_name=branch_name,\n end_transaction_rid=end_transaction_rid,\n preview=preview,\n version_id=version_id,\n )\n print(\"The get_schema response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling Dataset.get_schema: %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)"
"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# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# ObjectTypeApiName | The type of the object to aggregate on.\nobject_type = \"employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"properties.tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"properties.tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[ArtifactRepositoryRid] | The repository associated with a marketplace installation.\nartifact_repository = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used.\nbranch = None\n# Optional[SdkPackageName] | The package name of the generated SDK.\npackage_name = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.aggregate(\n ontology,\n object_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n artifact_repository=artifact_repository,\n branch=branch,\n package_name=package_name,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.aggregate: %s\\n\" % e)"
1148
+
"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# OntologyIdentifier | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**.\nontology = \"palantir\"\n# ObjectTypeApiName | The type of the object to aggregate on.\nobject_type = \"employee\"\n# List[AggregationV2]\naggregation = [\n {\"type\": \"min\", \"field\": \"properties.tenure\", \"name\": \"min_tenure\"},\n {\"type\": \"avg\", \"field\": \"properties.tenure\", \"name\": \"avg_tenure\"},\n]\n# List[AggregationGroupByV2]\ngroup_by = [\n {\n \"field\": \"startDate\",\n \"type\": \"range\",\n \"ranges\": [{\"startValue\": \"2020-01-01\", \"endValue\": \"2020-06-01\"}],\n },\n {\"field\": \"city\", \"type\": \"exact\"},\n]\n# Optional[AggregationAccuracyRequest]\naccuracy = None\n# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used.\nbranch = None\n# Optional[SdkPackageRid] | The package rid of the generated SDK.\nsdk_package_rid = None\n# Optional[SdkVersion] | The version of the generated SDK.\nsdk_version = None\n# Optional[SearchJsonQueryV2]\nwhere = {\"type\": \"eq\", \"field\": \"name\", \"value\": \"john\"}\n\n\ntry:\n api_response = client.ontologies.OntologyObject.aggregate(\n ontology,\n object_type,\n aggregation=aggregation,\n group_by=group_by,\n accuracy=accuracy,\n branch=branch,\n sdk_package_rid=sdk_package_rid,\n sdk_version=sdk_version,\n where=where,\n )\n print(\"The aggregate response:\\n\")\n pprint(api_response)\nexcept foundry_sdk.PalantirRPCException as e:\n print(\"HTTP error when calling OntologyObject.aggregate: %s\\n\" % e)"
**name** | FieldName | Yes | The name of a column. May be absent in nested schema objects. |
11
+
**nullable** | bool | Yes | Indicates whether values of this field may be null. |
12
+
**user_defined_type_class** | Optional[str] | No | Canonical classname of the user-defined type for this field. This should be a subclass of Spark's `UserDefinedType`. |
13
+
**custom_metadata** | Optional[CustomMetadata] | No | User-supplied custom metadata about the column, such as Foundry web archetypes, descriptions, etc. |
14
+
**array_subtype** | Optional[DatasetFieldSchema] | No | Only used with {@link FieldDataType#ARRAY}. |
15
+
**precision** | Optional[int] | No | Only used with {@link FieldDataType#DECIMAL}. |
16
+
**scale** | Optional[int] | No | Only used with {@link FieldDataType#DECIMAL}. |
17
+
**map_key_type** | Optional[DatasetFieldSchema] | No | Only used with {@link FieldDataType#MAP}. |
18
+
**map_value_type** | Optional[DatasetFieldSchema] | No | Only used with {@link FieldDataType#MAP}. |
19
+
**sub_schemas** | Optional[List[DatasetFieldSchema]] | No | Only used with {@link FieldDataType#STRUCT}. |
20
+
21
+
22
+
[[Back to Model list]](../../../../README.md#models-v2-link)[[Back to API list]](../../../../README.md#apis-v2-link)[[Back to README]](../../../../README.md)
[[Back to Model list]](../../../../README.md#models-v2-link)[[Back to API list]](../../../../README.md#apis-v2-link)[[Back to README]](../../../../README.md)
[[Back to Model list]](../../../../README.md#models-v2-link)[[Back to API list]](../../../../README.md#apis-v2-link)[[Back to README]](../../../../README.md)
0 commit comments