You could try the following steps to address those specific points you've raised.
- Getting Current Timestamp in Oracle Date Format: Use the following expression in a Set Variable activity to get the current timestamp in Eastern Time Zone and format it as Oracle DATE.
@formatDateTime(convertTimeZone(utcNow(), 'UTC', 'Eastern Standard Time'), 'YYYY-MM-DD')
- Using Variables in Insert and Update Statements:
Enclose variables in@{}
within your SQL statements.
INSERT INTO ... VALUES (@{variables('Seq')}, 'Full Load', @{variables('Start_Date')}, ...)
UPDATE ... SET END_DATE = @{variables('End_Date')}, ... WHERE ETL_RUN_ID = @{variables('Seq')}
- Storing Date in a Variable: Use the
formatDateTime
expression to format the date as needed and store it in a variable.
@formatDateTime(convertTimeZone(utcNow(), 'UTC', 'Eastern Standard Time'), 'YYYY-MM-DD')