Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

RunCmd tool capture console output

gillsuki
6 - Meteoroid

Hi

I've configured a simple RunCmd tool in Designer to run a powershell script.

The script simply writes some text to the console when launched.

Is there a tool I can use to capture the console output of the RunCmd tool ?

Regards

Suki

 

11 REPLIES 11
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@gillsuki is it possible to enable tracing (or something equivalent) that'll produce an output file as part of your powershell script? I'd hope there's a function or a couple of lines you can add to the script and voila 💫. This prevents the need for an additional tool.

All the best,
BS

LinkedIN

Bulien
Gaurav_Dhama_
12 - Quasar

add the output path at the end of your script like

 

your_command > output.log

 

In powershell you can also do

 

Start-Transcript -Path "C:\Logs\script_log.txt"

# Your script commands here
Get-Service
Write-Output "Script completed."

Stop-Transcript
gillsuk
6 - Meteoroid

Cool, I can dump the console output to a text file.


Is there a tool to view flat files (.txt)? I 've got it wired to the browse control which kind of assumes the data is tabular oriented.

 

Was looking for something that just display the text in free form (raw)

 

gillsuk_0-1755181965210.png

 

 

Gaurav_Dhama_
12 - Quasar

free form as in?

notepad is what i will use to see it, if thats what you are asking.

KGT
13 - Pulsar

By freeform, do you mean in one cell? The characters that define the new line in your output are creating a new line unless you specify it not to. Maybe try \0 as the delimiter in the input.

 

Otherwise, just use a summarise straight afterwards, to concatenate the field using \n as the delimiter.

gillsuk
6 - Meteoroid

Yes effectively like notepad.exe but displayed in the results panel.

 

You could use the action to copy header + rows and paste into notepad.exe but it gives you warning below, which mean's the output copied is not consistent with the results pane.

 

 

gillsuk_0-1755242624853.png

 

 

Gaurav_Dhama_
12 - Quasar

Read it as csv with delimiter \0 or flat file and select delimiter as \0. Increase the column content width to 5000+
then you will have all your data in a single cell.

mbarone
16 - Nebula
16 - Nebula

Here's a preview of an upcoming Blog I'll be posting that I believe addresses this issue.

KGT
13 - Pulsar

@gillsuk, that notification is because you are trying to copy from the "Browse Anywhere", on the node of the tool, rather than from a browse. The node will only show a sample of the data (by default 1MB, with max size of 256 characters), hence the message that it may have truncated data. Use a browse to copy from if you want to guarantee.

Labels
Top Solution Authors