BookmarkSubscribeRSS Feed
margautz
Fluorite | Level 6

Hello,

in the "Rule details" panel I can select "Log to text file".
I have two questions to ask:

1- I can specify the location and I can add "Ensure file name is unique", but it add a suffix after the .txt and I cannot open the files (just after renaming the file). How can I use it?
2- in the header, is it possible to put a macro field? I mean, if my task is to check if a field is null and the field could be "city", "number", "zip code",... is it possible to put in the header sometingh like "address with missing values in %%xxx%%" and automaticallz substitute %%xxx%% with "city", "number" or "zip code"?

My idea is to monitor two fields applying the same rule/task. Maybe the workaround is to create a Data Validation step + a text output step, but then...how can I monitor it?

 

Thank you for your time,

Margherita

1 REPLY 1
MKQueen
SAS Super FREQ

The best way to do what you want is to use a macro variable for the Monitoring Filename.  You can set the filename macro using the setvar() function in an Expression node prior to calling the Data Monitoring node in your Data Job.  You will need to pass in the macro varible using the KEY_VALUES Advanced Property in the node as shown in the screenshot.  Also, note as shown in this example I'm using macro variables in other places such as the Field names being passed in and the Description.

 

Data_Monitoring_Advanced_Properties.png

Task_Properties.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1007 views
  • 0 likes
  • 2 in conversation