transsecs:database:connecting_to_databricks
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| transsecs:database:connecting_to_databricks [2026/09/28 12:24] – [Related Pages] tputman | transsecs:database:connecting_to_databricks [2026/09/28 13:19] (current) – tputman | ||
|---|---|---|---|
| Line 52: | Line 52: | ||
| TransSECS receives the S6F11 event, acknowledges it with S6F12, and writes the event values to Databricks. | TransSECS receives the S6F11 event, acknowledges it with S6F12, and writes the event values to Databricks. | ||
| + | |||
| + | The workflow was verified both with **TransSECS Builder in LIVE mode** and with the packaged **GEMHostDeployment** runtime running independently of Builder. | ||
| ==== Step 1: Get the Databricks Connection Details ==== | ==== Step 1: Get the Databricks Connection Details ==== | ||
| Line 588: | Line 590: | ||
| | EventName | `STARTED` | | | EventName | `STARTED` | | ||
| - | The verified test produced: | + | The clean Builder LIVE verification |
| < | < | ||
| Line 599: | Line 601: | ||
| STARTED | STARTED | ||
| </ | </ | ||
| + | |||
| + | The packaged GEMHostDeployment runtime was later verified independently and produced: | ||
| + | |||
| + | < | ||
| + | 2026-09-28T11: | ||
| + | LOT_001 | ||
| + | Recipe_A | ||
| + | 50 | ||
| + | 1 | ||
| + | 7501 | ||
| + | STARTED | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | Triggered Historical may not make the row visible immediately after the S6F11/S6F12 exchange. | ||
| + | |||
| + | During the standalone deployment verification, | ||
| + | </ | ||
| This confirms the complete path: | This confirms the complete path: | ||
| Line 609: | Line 629: | ||
| TransSECS 11026 / Java 11 | TransSECS 11026 / Java 11 | ||
| | | | | ||
| - | | Databricks JDBC 3.4.2 | + | | Triggered Historical |
| v | v | ||
| - | Databricks | + | Databricks |
| | | | | ||
| v | v | ||
| Line 652: | Line 672: | ||
| </ | </ | ||
| - | < | + | === Run the Packaged Deployment === |
| - | The final clean 2026-09-28 STARTED-to-Databricks row was verified with the TransSECS Builder in LIVE mode. | + | |
| - | The generated Java 11 deployment | + | Do not leave TransSECS Builder in LIVE mode while validating the standalone |
| - | To specifically validate | + | With the GEM Tool simulator running, switch Builder out of LIVE mode or close Builder. |
| - | </note> | + | |
| + | Then start the packaged runtime: | ||
| + | |||
| + | <code powershell> | ||
| + | Set-Location " | ||
| + | |||
| + | .\run.bat | ||
| + | </ | ||
| + | |||
| + | The verified startup used Java 11.0.31 | ||
| + | |||
| + | < | ||
| + | Simulation mode: LIVE | ||
| + | Started GEMHost connecting to localhost on port 5010 with device id 1 | ||
| + | </ | ||
| + | |||
| + | The Java 11 Arrow reflective-access warning may still appear. It is non-blocking if the Databricks JDBC connection opens successfully. | ||
| + | |||
| + | Verify the equipment side is listening: | ||
| + | |||
| + | <code powershell> | ||
| + | Get-NetTCPConnection -LocalPort 5010 -ErrorAction SilentlyContinue | | ||
| + | Select-Object LocalAddress, | ||
| + | </ | ||
| + | |||
| + | Verify the standalone host is connected to the equipment: | ||
| + | |||
| + | <code powershell> | ||
| + | Get-NetTCPConnection -RemotePort 5010 -ErrorAction SilentlyContinue | | ||
| + | Select-Object LocalAddress, | ||
| + | </ | ||
| + | |||
| + | The verified standalone runtime showed an **Established** client connection to `127.0.0.1: | ||
| + | |||
| + | The deployment log also reported: | ||
| + | |||
| + | < | ||
| + | Connection: " | ||
| + | </ | ||
| + | |||
| + | Send the same STARTED event described above and verify the resulting Databricks row. | ||
| + | |||
| + | The packaged runtime was verified end to end on 2026-09-28 with this row: | ||
| + | |||
| + | < | ||
| + | 2026-09-28T11: | ||
| + | LOT_001 | ||
| + | Recipe_A | ||
| + | 50 | ||
| + | 1 | ||
| + | 7501 | ||
| + | STARTED | ||
| + | </ | ||
| + | |||
| + | This proves the deployed path independently of Builder: | ||
| + | |||
| + | < | ||
| + | GEM Tool | ||
| + | | | ||
| + | | HSMS / SECS-GEM | ||
| + | v | ||
| + | GEMHostDeployment | ||
| + | | | ||
| + | | Java 11 / Triggered Historical | ||
| + | v | ||
| + | Databricks JDBC 3.4.2 | ||
| + | | | ||
| + | v | ||
| + | workspace.default.secs_poc | ||
| + | </code> | ||
| ==== Troubleshooting ==== | ==== Troubleshooting ==== | ||
| Line 759: | Line 847: | ||
| If the SECS event is received and acknowledged but no row appears: | If the SECS event is received and acknowledged but no row appears: | ||
| - | * Check the TransSECS console for JDBC or SQL errors. | + | * Wait about 30 seconds and query the table again. Triggered Historical may write after the immediate S6F11/S6F12 exchange. |
| * Confirm Historical points to the intended DatabaseConnection. | * Confirm Historical points to the intended DatabaseConnection. | ||
| - | * Confirm the Databricks table already | + | |
| + | | ||
| * Query the table ordered by `ts DESC`. | * Query the table ordered by `ts DESC`. | ||
| - | * Check the Databricks SQL Warehouse Query History. | + | |
| + | | ||
| + | |||
| + | For the packaged runtime, the verified log file is: | ||
| + | |||
| + | < | ||
| + | C: | ||
| + | </ | ||
| + | |||
| + | A useful PowerShell filter is: | ||
| + | |||
| + | <code powershell> | ||
| + | $log = " | ||
| + | |||
| + | Get-Content $log -Tail 500 | | ||
| + | Select-String -Pattern " | ||
| + | </ | ||
| + | |||
| + | === Increase Historical Debug Logging === | ||
| + | |||
| + | If the Historical log says to set Debug Level to 10, edit: | ||
| + | |||
| + | < | ||
| + | GEMHostDeployment\ErgoTechConfiguration.properties | ||
| + | </ | ||
| + | |||
| + | The relevant property is: | ||
| + | |||
| + | < | ||
| + | historical.debuglevel=0 | ||
| + | </ | ||
| + | |||
| + | Change it temporarily to: | ||
| + | |||
| + | < | ||
| + | historical.debuglevel=10 | ||
| + | </ | ||
| + | |||
| + | The `sessionmanager.debuglevel` property controls SECS/HSMS session logging and does not need to be changed just to troubleshoot Historical database writes. | ||
| + | |||
| + | Example PowerShell: | ||
| + | |||
| + | <code powershell> | ||
| + | $config = " | ||
| + | |||
| + | Copy-Item $config " | ||
| + | |||
| + | (Get-Content $config) ` | ||
| + | -replace ' | ||
| + | Set-Content $config | ||
| + | </ | ||
| + | |||
| + | Restart `GEMHostDeployment\run.bat` after changing the property, reproduce one event, and inspect `SECSMessages.log`. | ||
| + | |||
| + | When troubleshooting is complete, return the setting to: | ||
| + | |||
| + | < | ||
| + | historical.debuglevel=0 | ||
| + | </ | ||
| + | |||
| + | and restart the deployment the next time it is run. | ||
| + | |||
| + | === "2 of 8 MAP columns not written" | ||
| + | |||
| + | With Historical debug level 10, the verified deployment reported: | ||
| + | |||
| + | < | ||
| + | 2 of 8 MAP columns [RPTID, ReportName] are not written to the " | ||
| + | because this data is optional and the table does not contain these columns. | ||
| + | The rest of the row is written normally. | ||
| + | </ | ||
| + | |||
| + | For the verified `secs_poc` schema, this is informational rather than a failed historian write. | ||
| + | |||
| + | `RPTID` and `ReportName` are optional MAP metadata columns. The verified seven-column table does not require them: | ||
| + | |||
| + | < | ||
| + | ts | ||
| + | LOTID | ||
| + | PPID | ||
| + | SetPoint | ||
| + | WaferCount | ||
| + | CEID | ||
| + | EventName | ||
| + | </ | ||
| + | |||
| + | If those optional values are desired, add text columns for them to the Databricks table or use a configuration that allows Historical to create the table/ | ||
| + | |||
| + | If they are not needed for the demo, the warning can be left as-is because the normal event row is still written. | ||
| === Blank LOTID Appears in Databricks === | === Blank LOTID Appears in Databricks === | ||
| Line 823: | Line 1000: | ||
| | Event | `STARTED` | | | Event | `STARTED` | | ||
| | CEID | `7501` | | | CEID | `7501` | | ||
| + | | Verified Host Modes | `Builder LIVE` and `GEMHostDeployment` | | ||
| - | The successful | + | The successful |
| * Java 11 startup | * Java 11 startup | ||
| Line 836: | Line 1014: | ||
| * S6F12 acknowledgement | * S6F12 acknowledgement | ||
| * Triggered Historical processing | * Triggered Historical processing | ||
| - | * Successful Databricks row insertion | + | * Successful Databricks row insertion |
| + | * Successful Databricks row insertion from the packaged GEMHostDeployment runtime | ||
| + | * Optional MAP columns `RPTID` and `ReportName` may be omitted without preventing the normal row write | ||
| - | The known-good | + | The Builder LIVE known-good |
| + | |||
| + | < | ||
| + | 2026-09-28T09: | ||
| + | LOT_001 | ||
| + | Recipe_A | ||
| + | 50 | ||
| + | 1 | ||
| + | 7501 | ||
| + | STARTED | ||
| + | </ | ||
| + | |||
| + | The standalone GEMHostDeployment known-good row was: | ||
| + | |||
| + | < | ||
| + | 2026-09-28T11: | ||
| + | LOT_001 | ||
| + | Recipe_A | ||
| + | 50 | ||
| + | 1 | ||
| + | 7501 | ||
| + | STARTED | ||
| + | </ | ||
| + | |||
| + | The known-good deployed path is: | ||
| < | < | ||
| Line 845: | Line 1049: | ||
| Report 101 | Report 101 | ||
| -> | -> | ||
| - | TransSECS 11026 / Java 11 | + | GEMHostDeployment / TransSECS 11026 / Java 11 |
| + | -> | ||
| + | Triggered Historical | ||
| -> | -> | ||
| Databricks JDBC 3.4.2 | Databricks JDBC 3.4.2 | ||
| Line 857: | Line 1063: | ||
| * Switch TransSECS Builder out of LIVE mode or close the project. | * Switch TransSECS Builder out of LIVE mode or close the project. | ||
| + | * Stop `GEMHostDeployment\run.bat` if the packaged runtime is running. | ||
| + | * If Historical debug logging was raised for troubleshooting, | ||
| * Close the StandAloneGEMTool simulator. | * Close the StandAloneGEMTool simulator. | ||
| * Temporary `GEMTool11026_...` folders under `%TEMP%` can be removed. | * Temporary `GEMTool11026_...` folders under `%TEMP%` can be removed. | ||
transsecs/database/connecting_to_databricks.txt · Last modified: by tputman
