1. Home
  2. Explore
  3. Computer Science
  4. SAS Cloud Time Series Processing

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

SAS Cloud Time Series Processing

Speaker 1Speaker 2

SAS Cloud Time Series Processing

3:18
0:00-3:18
  1. Anna

    Have you heard about SAS Visual Forecasting's new External Languages Package? It lets you use Python and R code alongside SAS for time series processing.

  2. Hope

    I've heard a bit about that. But how does the back-end actually work? They mentioned something called TSMODEL.

  3. Anna

    Right. TSMODEL is a cloud-based infrastructure that runs on top of Cloud Analytic Services. It handles data movement and processing across a cluster, and it scales really well—they've tested it with millions of time series.

  4. Hope

    So what happens when you submit a script? Does it just run on each node?

  5. Anna

    Yes. The system replicates your script—which can now mix SAS, Python, and R—onto each worker node. That script gets compiled into machine code for efficiency. Then, when you have Python or R code, the node launches an interpreter, like python.exe, and feeds it the extracted code.

  6. Hope

    What about data? How does the parallel processing work?

  7. Anna

    The distributed file system sends the data to the nodes automatically. For example, if you have seven time series across two tables and four nodes, three nodes get two series each and the last gets one. With modern nodes having multiple CPU cores, they can process all series in parallel. The output goes back to the file system automatically.

  8. Hope

    I imagine sharing data between SAS and Python could be tricky. How is that handled?

  9. Anna

    They make it easy with shared variables. You specify which variables to pass using the AddVariable method. You can also set an alias so your existing Python code doesn't need to change. And to avoid unnecessary data movement, you can mark variables as read-only—only those you want to write back are sent.

  10. Hope

    The External Languages Package seems to have different object types. Can you break those down?

  11. Anna

    Sure. There are interpreter objects—like Python2 or R—that let you insert code directly, from a file, or from a CAS table. Then collector objects store logs or shared variable status into CAS tables so you can troubleshoot later. And there's a repeater object for loading stored source code.

  12. Hope

    Interesting. Can you walk me through an actual example? Something like a moving average calculation?

  13. Anna

    Absolutely. First, you set up PROC TSMODEL with your input data, like a skin product sales table. You specify the time variable, the BY variable for parallelization (like distribution center), and the revenue variable you want to analyze. Then you require the External Languages Package, start a submit block, and create a Python interpreter object.

  14. Hope

    Got it. Then you need to share variables, right?

  15. Anna

    Exactly. You use AddVariable for revenue (read-only) and for the moving average you want to compute (not read-only so it's written back). Then you insert your Python code—using convolution to compute the moving average—call the run method, and collect the logs with an OUTEXTLOG object. That's it; the heavy lifting is just that little bit of setup.

  16. Hope

    What about using this through the GUI? Can you integrate external language code into Model Studio?

  17. Anna

    Yes, you can add open source nodes to pipelines in Model Studio. For instance, you can include an R ARIMA model as part of automatic model selection. The system then uses that code alongside traditional SAS models.

  18. Hope

    That's really powerful. It opens up time series processing to a much wider range of analysts.

  19. Anna

    And it scales incredibly well. They showed a benchmark: processing 87 GB of data with 400 threads took about 5 minutes, compared to 130 hours with serial processing. So it's both flexible and performant.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent