cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

DateMacro For Netezza Execute

groverarena
New Contributor

Hi,
I am new to SnapLogic and I am trying to execute a Generic JDBC for Netezza. The query works fine and output a table to Oracle. How can I add a macro on the fly for the previous month last date of the month. I tried documentation but itโ€™s not helping much.
Can somebody please guide?

Details:
FROM NZ_MODEL.ATTBN_PODS_MTH_ASSIGNMENT T
JOIN NZ_MODEL.ATTBN_PROVIDER_STG P
ON T.SRC_PROV_UNIQ_ID = P.SRC_PROV_UNIQ_ID
// Previous Month Last Date//
WHERE T.AS_OF_DATE_SKEY=20190131; (Need to replace that with macro)

4 REPLIES 4

groverarena
New Contributor

@tmiller @dstack, can you help?

I donโ€™t know Netezza, but I think there was a similar date request using our expression language in this Community. Let me see if I can find itโ€ฆ

Edited to add the link to start with: Expression - Last Day of the Month - #6 by aaronb.
This might be a good starting point with a couple options.


Diane Miller
Community Manager

Hi,
How can I debug these expressions or check in values in Snaplogic?
Date.now().plusMonths(1).withDayOfMonth(1).minusDays(1)

You can use the โ€œDynamic Validationโ€ feature to see the results of expressions as you enter them. To view the results of sub-expressions, for example Date.now().plusMonths(1), you can move the cursor to that part of the expression to see those results.

Hereโ€™s a gif of DV in action:

debug-date-expr