Microsoft Connector for Oracle - using ssis parameters

Pedro Soares 396 Reputation points
2022-04-28T10:17:03.64+00:00

Hi guys,

I've been using the new Microsoft Connector for Oracle to extract data from a Oracle database. I will need to create some logic to implement an incremental load based on 2 datetime fields of the source table.

I will need however to pass 2 datetime parameters (start_date and end_date) to the SQL query and I'm struggling with the syntax. Last time I did this, I used SQL Query from Variable but it's not available on the Oracle Source editor.

The date variables on SSIS are fed by a Execute SQL Task, I just need to know how to embed the variables in the SQL query that extracts data from the Oracle Source connector.

Thank you

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,615 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 38,626 Reputation points
    2022-04-29T02:11:58.5+00:00

    Hi @Pedro Soares ,

    To work around this, we can use [Oracle Source].[SqlCommand] property expressions of Data Flow Task. For more details, please see:

    1. Created a package variable.
    2. Set the variable to evaluate as expression true.
    3. Put the query in expression along with vaiable v_num as a different package variable.
    4. Open the Data Flow Task properties window.
    5. Click on the "..." beside the "Expressions". That will open the Property Expressions Editor.
    6. For the Property, select the [Oracle Source].[SqlCommand].
    7. For the Expression, click the "...", this will open the Expression Builder window in which you can expand the Variables node and drag and drop the variable you want.

    Here is a nice article you may take a reference to.

    how-to-parameterize-source-query-attunity-oracle-connector

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Pedro Soares 396 Reputation points
    2022-04-29T08:37:39.28+00:00

    Great, it's working. Thank you

    As an additional note, just to blast off some steam, it would be great if the parameter mapping and result set could be changed. I find this mechanism very obsolete and not adequate for today challenges, It puzzles me that Microsoft over 15 years didn't change practically nothing on SSIS components and we have a text editor that we fill with ? and then on another windows we order those parameters. Not only it's not practical, it is a very poorly designed UI for an ETL tool.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.