document our main implementation script - #6
Conversation
There was a problem hiding this comment.
3 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="exports/rad_ai_ps_extraction_script.txt">
<violation number="1" location="exports/rad_ai_ps_extraction_script.txt:20">
P3: Minor typo in comment: "add the follow filed" should read "add the following field". While functionally harmless, this is a customer-facing script and these kinds of errors reduce confidence in the script's quality.</violation>
<violation number="2" location="exports/rad_ai_ps_extraction_script.txt:43">
P2: Importing the deprecated SQLPS module instead of the SqlServer module. SQLPS is no longer packaged with SSMS (16.x+), has no active feature development, and may not be present on systems without a SQL Server installation. Recommend switching to `Import-Module SqlServer` (available via `Install-Module -Name SqlServer` from the PowerShell Gallery) and ensuring the Invoke-Sqlcmd calls remain compatible.</violation>
<violation number="3" location="exports/rad_ai_ps_extraction_script.txt:47">
P1: The credential pattern here encourages storing database credentials in plaintext within the script file. If this script is saved, shared, or committed anywhere (even temporarily), the passwords are exposed in cleartext. Consider using Windows Authentication (already supported), prompting interactively with `$credential = Get-Credential` and passing `-Credential $credential`, or reading from a secure credential file. If plaintext is unavoidable in the customer's environment, at minimum add a warning comment about never checking this file into source control.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
|
|
||
| ########################### ONLY IF NOT USING WINDOWS AUTH ########################### | ||
| $username = "replace with username" # specify if not using Windows auth |
There was a problem hiding this comment.
P1: The credential pattern here encourages storing database credentials in plaintext within the script file. If this script is saved, shared, or committed anywhere (even temporarily), the passwords are exposed in cleartext. Consider using Windows Authentication (already supported), prompting interactively with $credential = Get-Credential and passing -Credential $credential, or reading from a secure credential file. If plaintext is unavoidable in the customer's environment, at minimum add a warning comment about never checking this file into source control.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At exports/rad_ai_ps_extraction_script.txt, line 47:
<comment>The credential pattern here encourages storing database credentials in plaintext within the script file. If this script is saved, shared, or committed anywhere (even temporarily), the passwords are exposed in cleartext. Consider using Windows Authentication (already supported), prompting interactively with `$credential = Get-Credential` and passing `-Credential $credential`, or reading from a secure credential file. If plaintext is unavoidable in the customer's environment, at minimum add a warning comment about never checking this file into source control.</comment>
<file context>
@@ -0,0 +1,73 @@
+
+
+########################### ONLY IF NOT USING WINDOWS AUTH ###########################
+$username = "replace with username" # specify if not using Windows auth
+$password = "replace with password" # specify if not using Windows auth
+
</file context>
| $outfile = ".\radai-results.csv" # Name of output CSV (file will be overwritten unless renamed) | ||
|
|
||
| Push-Location $PWD | ||
| Import-Module SQLPS |
There was a problem hiding this comment.
P2: Importing the deprecated SQLPS module instead of the SqlServer module. SQLPS is no longer packaged with SSMS (16.x+), has no active feature development, and may not be present on systems without a SQL Server installation. Recommend switching to Import-Module SqlServer (available via Install-Module -Name SqlServer from the PowerShell Gallery) and ensuring the Invoke-Sqlcmd calls remain compatible.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At exports/rad_ai_ps_extraction_script.txt, line 43:
<comment>Importing the deprecated SQLPS module instead of the SqlServer module. SQLPS is no longer packaged with SSMS (16.x+), has no active feature development, and may not be present on systems without a SQL Server installation. Recommend switching to `Import-Module SqlServer` (available via `Install-Module -Name SqlServer` from the PowerShell Gallery) and ensuring the Invoke-Sqlcmd calls remain compatible.</comment>
<file context>
@@ -0,0 +1,73 @@
+$outfile = ".\radai-results.csv" # Name of output CSV (file will be overwritten unless renamed)
+
+Push-Location $PWD
+Import-Module SQLPS
+
+
</file context>
| # | ||
| # To limit the results to specific sites, add "[ORDER].SiteID in (1, 2, 3)" to the WHERE clause | ||
| # | ||
| # If residents are part of workflow, add the follow filed to the SELECT statement: |
There was a problem hiding this comment.
P3: Minor typo in comment: "add the follow filed" should read "add the following field". While functionally harmless, this is a customer-facing script and these kinds of errors reduce confidence in the script's quality.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At exports/rad_ai_ps_extraction_script.txt, line 20:
<comment>Minor typo in comment: "add the follow filed" should read "add the following field". While functionally harmless, this is a customer-facing script and these kinds of errors reduce confidence in the script's quality.</comment>
<file context>
@@ -0,0 +1,73 @@
+#
+# To limit the results to specific sites, add "[ORDER].SiteID in (1, 2, 3)" to the WHERE clause
+#
+# If residents are part of workflow, add the follow filed to the SELECT statement:
+# ", Report.Overread AS Overread, Report.SecondSignerAcctID"
+
</file context>
Description
This is the main implementation script used for Impressions model onboarding
Change Type
Requirements
Summary by cubic
Adds a documented PowerShell export script to generate a CSV from the PS database for model training and Impressions onboarding.
exports/rad_ai_ps_extraction_script.txtto.ps1and run in PowerShell (or run the query in SSMS).$serverand$outfile. Add-Username/-Passwordif not using Windows auth.TOP 15000after sample review, filter bySiteIDif needed, and add resident fields (Overread,SecondSignerAcctID) if applicable.Written for commit c0dec17. Summary will update on new commits.