Does the Postgres Destination Support User Variables?

Does the Postgres Destination Support User Variables?

Postby sxwalsh55 » Thu 04 Aug 2016 20:36

I'm using the SSIS Postgres flow components, and I don't see anywhere that a user variable can be used in the source table field. This is useful to me because I'd like to be able to use a variable to control the target schema of the flow components of my package.

So far it looks like I need to open up every data flow and make all schema changes manually when switching back and forth between environments, which we control with schemas.

Thanks
sxwalsh55
 
Posts: 4
Joined: Tue 26 Jul 2016 01:50

Re: Does the Postgres Destination Support User Variables?

Postby Shalex » Fri 07 Oct 2016 20:01

Sorry for the delay.

Please define your parameter (for example, with name=TODAY and expression=GETDATE() ) via SSIS > Variables menu of Visual Studio.

Devart PostgreSql Source: you can use newly created parameter in the query in the following way
Code: Select all
select * from MyTable where LastModifiedDate='<@User::TODAY>'

Devart PostgreSql Destination: create an additional component Derived Column (the Common tab in SSIS Toolbox)
some source -> Derived Column -> Devart PostgreSql Destination
Now you can drag&drop User::TODAY to the bottom surface within Derived Column Transformation Editor to create a new Input Column for Devart PostgreSql Destination (map it via the Column Mappings tab).

Does this help?
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44


Return to SSIS Data Flow Components