Skip to content

Airflow: Added support for output_macro_var_prefix #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apsaros
Copy link

@apsaros apsaros commented May 30, 2025

Signed-off-by: Andreas Psaros [email protected]

Please include answers to these questions as part of your pull request

In the GitHub webUI, use the Write tab to modify the Markdown text that is part of the pull request. For each question simply place an X inside the square brackets, [X], that represents your answer. Make sure there are no blanks inside the brackets, otherwise MarkDown doesn't render properly. Using the Preview tab while editing this form, you can see the formatted/rendered version of the message.

  • Q1: Confirm that you have the right to submit the code that is being contributed. Please consider the origin of your code and confirm you have the appropriate rights to make the submission subject to the Apache 2.0 license that applies to everything in this repository of custom steps. If so, follow the instructions for the Contributor Agreement (which is based on the industry-standard Developer Certificate of Origin (DCO)).
    • Yes, I have the right to submit the contributed code on behalf of myself, my company, or any other owner of the code. I have also attached my signed copy of the DCO to this message.
    • No
  • Q2: Confirm that your contribution does not include any personally identifiable information (PII), for example, in any examples used in your README file.
    • My contribution does NOT include PII data
    • My contribution includes PII data
  • Q3: Confirm your contribution does not include any encryption or other export-controlled technology.
    • My contribution does NOT contain encryption or other export-controlled technology
    • My contribution includes encryption or other export-controlled technology

apsaros added 2 commits May 30, 2025 07:58
…thub.com>

I, apsaros <[email protected]>, hereby add my Signed-off-by to this commit: 0b29c7c

Signed-off-by: apsaros <[email protected]>
@apsaros
Copy link
Author

apsaros commented May 30, 2025

The PR adds support for the output_maro_var_prefix, which is available in SAS Airflow Provider.
The change to the custom steps for "Airflow - Generate DAG" is as following:

Airflow - Add Task

  • Added a new section and input under the Parameters tab:
    image
  • Added input as a variable with upcase, since the prefix needs to be in uppercase according to my tests:
    __output_var_prefix=upcase(strip("&__output_var_prefix")) ;

Airflow - Finalize DAG

  • Added __output_var_prefix to the proc freq statement
  • In the 'else if' segment of "flow","program", the following was added:
         if __output_var_prefix ne "" then do ;
            put "   output_macro_var_prefix=""" __output_var_prefix +(-1) """," ;
         end ;

@snlwih
Copy link
Collaborator

snlwih commented Jun 12, 2025

Hi Andres (@apsaros),

Thank you for enhancing these Airflow related custom steps. I don't have the infrastructure to test these. @nicrobert , any feedback from your side, as you contributed the initial versions of this step? Could you quickly test these to see if they work for you?

Before I can merge them I have a few small update requests:

  • Could you download the contributor agreement file (https://github.com/sassoftware/sas-studio-custom-steps/blob/main/ContributorAgreement.txt), and add your name and email address to it, and then include that file in the comment thread?

  • Could you update the README.md file in the folder for these steps as follows:

    • Add a line in the Change Log to represent this new version, let's call it 1.6, and provide the relevant info for each of the columns.
    • It would be nice if you could update the screenshot for the tab (Parameters tab I think) where you added the additional UI controls. But if that is too much work for you, then skipping that is okay as well.
  • Could you update the About tab in both of the steps and add some version history

And again, many thanks for your contribution.

Cheers,
Wilbram Hazejager

@nicrobert
Copy link
Contributor

I'll see if I can test next week.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants