cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1053
Views
0
Helpful
1
Replies

Issue with Extra Whitespace in Public Tidal Variable

Hi All,

I'm currently having an issue using a public Tidal variable in the file path of a ROBOCOPY script that I'm writing.

We are running version 6.0.3.209

Here is the scenario where I'm having the failure;

1) I created a SQL job to pull a static string value from a databases (the SQL trims the string value to remove whitespaces from left and right)

2) I created a public string variable, a variable event, and a job event

3) When the SQL job completes, it triggers a job event which triggers the variable event and sets the public string variable to the output of the SQL job

The variable should be set to this value with no whitespaces: 20130702170530_Q2

4) I then pass this variable in the file path of my ROBOCOPY script, and the script fails

Steps 1-3 work just fine, HOWEVER, my script is failing in ALL scenarios EXCEPT hard-coding the value.

What's even stranger is that before I double click and open the variable, you can obviously see that there IS a whitespace (see top arrow in below img)

If I run my ROBOCOPY script using the variable like this, it Completes Abnormally (Failed)

Variable_Whitespace.png

When I double click to open the variable, without any modifications you can see that there is NO whitespace (see lower arrow in above img).

If I click ‘OK’ after Opening the variable without modifying it, the whitespace disappears (see arrow in img below).

Now if I run the exact same ROBOCOPY script using the exact same variable, it Completes Normally (Passed)

Variable_NoWhiteSpace.png

Does anyone know a workaround for this or has anyone experienced the same behavior?

I have tried multiple scenarios (passing the job output directly, passing the variable, concatenating 2 variables in to 1 and passing the entire folder path as a variable) and all are failing.

Any help would be greatly appreciated!

Best Regards,

Doug M.

1 Reply 1

Hi All,

I was actually able to find a workaround for this not using Tidal variables.  I ended up hard coding part of the file path in the SQL job which pulls the static string value, and concatenating the 2 strings like this:

SELECT TOP 1 'E:\data\inbound\KMK\RETROACTIVE\' + LTRIM(RTRIM([Data_Date]))

FROM [DB_NAME].[dbo].[TABLE_NAME]

WHERE = 946

When I pass the job output to my ROBOCOPY script it works perfectly.

I'll leave this as answered instead of deleting it in case anyone has the same issue