|
| 1 | +--- |
| 2 | +title: "scan_pdm_and_generate_logical_model" |
| 3 | +linkTitle: "scan_pdm_and_generate_logical_model" |
| 4 | +weight: 190 |
| 5 | +superheading: "catalog_data_source." |
| 6 | +--- |
| 7 | + |
| 8 | +``scan_pdm_and_generate_logical_model(data_source_id: str, generate_ldm_request: Optional[CatalogGenerateLdmRequest] = None, scan_request: CatalogScanModelRequest = CatalogScanModelRequest(), report_warnings: bool = False) -> tuple[CatalogDeclarativeModel, CatalogScanResultPdm]`` |
| 9 | + |
| 10 | +Scan data source and use returned PDM to generate logical data model. If generate_ldm_request |
| 11 | +contains PDM already, PDM tables received from the scan are appended without deduplication. |
| 12 | + |
| 13 | +{{% parameters-block title="Parameters"%}} |
| 14 | + |
| 15 | +{{< parameter p_name="data_source_id" p_type="string" >}} |
| 16 | +Data Source identification string. e.g. "demo" |
| 17 | +{{< /parameter >}} |
| 18 | + |
| 19 | +{{< parameter p_name="generate_ldm_request" p_type="Optional[CatalogGenerateLdmRequest]" >}} |
| 20 | +LDM options. Defaults to CatalogGenerateLdmRequest(separator="__", wdf_prefix="wdf") |
| 21 | +{{< /parameter >}} |
| 22 | + |
| 23 | +{{< parameter p_name="scan_request" p_type="Optional[CatalogScanModelRequest]" >}} |
| 24 | +Options for the Scan Request. Defaults to CatalogScanModelRequest(). |
| 25 | +{{< /parameter >}} |
| 26 | + |
| 27 | +{{< parameter p_name="report_warnings" p_type="bool" >}} |
| 28 | +Switch to turn on warnings. Defaults to False. |
| 29 | +{{< /parameter >}} |
| 30 | + |
| 31 | +{{% /parameters-block %}} |
| 32 | + |
| 33 | +{{% parameters-block title="Returns"%}} |
| 34 | + |
| 35 | +{{< parameter p_type="CatalogDeclarativeModel" >}} |
| 36 | +Object Containing declarative Logical Data Model. |
| 37 | +{{< /parameter >}} |
| 38 | + |
| 39 | +{{< parameter p_type="CatalogScanResultPdm" >}} |
| 40 | +An instance of CatalogScanResultPdm. |
| 41 | +Containing pdm itself and a list of warnings that occurred during scanning. |
| 42 | +{{< /parameter >}} |
| 43 | + |
| 44 | +{{% /parameters-block %}} |
| 45 | + |
| 46 | +## Example |
| 47 | + |
| 48 | +```python |
| 49 | +# Scan and generate logical model |
| 50 | +ldm, pdm = sdk.catalog_data_source.scan_pdm_and_generate_logical_model(data_source_id="demo-test-ds") |
| 51 | +``` |
0 commit comments