BookmarkSubscribeRSS Feed
ldms
Calcite | Level 5

Greetings,

Grateful for your attention, I would like to ask for some advisory with the SAS Enterprise Miner product:

I have the following  kind of files (example):

y1995m01w04d29.pdf

y1995m01w05d30.pdf

y1995m01w05d31.pdf

y1995m02w05d01.pdf

...

y1995m12w52d31.pdf

This means the first file belongs to the year 1995, month 01 = January, fourth week of the studied data base and it is the 29th of January to be precise.

I am currently performing Text Mining procedures with a data base that has daily files for year 1995.

I wanted to ask if it is possible to create a macro or a loop that:

-Runs the Import File node to the files that cover a certain characteristic in the file name (for example, run the Import File node only to the pdf files whose name contains "w04".

-After running the Import File node , runs the Text Parsing node to the imported files and save the results in a csv file.

-After running the Text Parsing node, runs the Text Filtering node to the parsed files and save the results in a csv file.

The procedure would need to repeat for every week, therefore first it would need to run for the files that contain "w01" in their name, then "w02" and so on.

Thank you before hand for your attention and time.

2 REPLIES 2
M_Maldonado
Barite | Level 11

The macro would be a really elegant solution. Maybe creating a model package would be one way to go.

If you are only going to do this weekly, one approach would be to save the xml of your diagram (right click and select Save diagram as) and import it later (import from XML).

Modifying the Import File and the Save Data nodes seems almost as easy as having a macro that needs file name and results as macro parameters.

What do you think?

Thanks,

Miguel

ldms
Calcite | Level 5

Hello Miguel,

Thank you for your advice!

I will try this and see how it goes.

Thank you for your time.

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 choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1044 views
  • 0 likes
  • 2 in conversation