SundareshSankaran / Vector-Databases---Hydrate-Chroma-DB-Collection

Apache License 2.0
1 stars 0 forks source link

Create Python execution code #1

Closed SundareshSankaran closed 10 months ago

SundareshSankaran commented 10 months ago

Idea is as follows: proc python called within a macro does not execute code within a submit block. The step requires running proc python as part of execution code. Execution code is best run inside a macro so as to take advantages of other checks (an error flag, a trigger and condition).

Options:

  1. Write the python instructions to a temporary file at run time and then pass the file as an infile parameter
  2. Call the Python script from a repository (Git / any web server) through filename url and pass as infile
  3. Attach file along with custom step.

Options are in order of preference. Strong no for #3 due to having to provide one more file for the user to remember to include.

SundareshSankaran commented 10 months ago

First baby step: write a small piece of Python code to a temp file through SAS

SundareshSankaran commented 10 months ago

SUCCESS: Baby step - python executed from a temp file to which some python code has been written.

File to Python execute.pdf

SundareshSankaran commented 10 months ago

SUCCESS: Baby step #2 - Python code written to temp file and then executed within a macro. Also demonstrated how Python code in a submit block within a macro fails (known, but to establish)

File to Python execute within macro.pdf

SundareshSankaran commented 10 months ago

Temporary simple solution using Datalines

Datalines4 in this case.

SundareshSankaran commented 10 months ago

Datalines resorted to. Continue to try and find a solution which outputs entire SAS code to replicate.

SundareshSankaran commented 10 months ago

Datalines4 adopted for ver 1.0