Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expression Builder of Connection Manager not showing Variables

Tags:

ssis

I'm having this exact same problem I've been looking aroung but this is the only place I've seen the same issue and it is not resolved.

Does anyone knows what the problem might be?

I checked in Visual Studio and my SSIS version is 11.0.2100.60 (not a trial, not a beta).

EDIT: These are the steps I'm taking and the issue

First I choose a Connection Manager, right-click, select properties and click in Expressions option step one

Then in Property Expression Builder choose Connection String property and click in Expression option enter image description here

Finally, in the Expression Builder dialog there is no option for variables, in every page I've read says that there should be a Variables node in there enter image description here

Am I missing something?

like image 218
jorgehmv Avatar asked Mar 21 '13 18:03

jorgehmv


People also ask

How to add variable in expression in SSIS?

Select the Connection Manager and select the property window to add an expression. On the expression property, click on the button. This will open another dialog box to choose the property for the Connection Manager. Select "ConnectionString" as the property and click on the expression button.

What is expressions in SSIS?

An expression is a combination of symbols-identifiers, literals, functions, and operators-that yields a single data value. Simple expressions can be a single constant, variable, or function. More frequently, expressions are complex, using multiple operators and functions and referencing multiple columns and variables.

Which properties can be set by using property expressions?

The following property expression can be used to set the Executable property of an Execute Process task. The expression uses a combination of string literals, operators, and functions. The expression uses the DATEPART and GETDATE functions and the conditional operator.

How do I open property expression editor in SSIS?

In the Property Expressions Editor, select a property in the Property list, and then do one of the following: Type or change the property expression directly in the Expression column, and then click OK. Click the ellipsis (...) in the expression row of the property to open the Expression Builder.


2 Answers

SSIS 2012 has introduced the concept of Project level connection managers. What I see on the referenced post on the MSDN forums it the user has created a project level flat file connection manager and is unable to configure it with a local variable. Assuming that is the problem, my answer follows.

An SSIS project is generally more than one package. To simplify lives, the SSIS team now allows for the sharing of common resources across projects, connection managers being one of those resources.

Logically, if a thing is shared across a project, how can something that only exists in one file configure that resource? That configuration change would only work when Package1 is executing. When Package2 fires, unless the same variable and same expression was applied to the shared resource, you would experience different outcomes. That'd be a maintenance nightmare, which you might already experience if you don't have strong configuration practices.

If I create a Flat File Connection Manager at the project level, I can only reference variables that are also at the project level. Except there are not variables at the project level. Instead, they are called Parameters.

To that end, I created a Parameter called SomeProjectParameter

project parameter

I then created a package, Package1.dtsx, and added 2 Flat File Connection Managers: FlatFileConnectionManagerLocal and FlatFileConnectionManagerProject

Instead that package, I also created a variable called SomeLocalVariable.

This screenshot shows me applying an expression to the ConnectionString property of FlatFileConnectionManagerLocal. There you can see that both the package variable, SomeLocalVariable is available as well as SomeProjectParameter

expression builder on local CM with parameter and local variable

Now, if I try to apply an expression to the project's connection manager, you will only have project parameters available to you.

project CM and only parameters available

It's interesting to note that you can't apply an expression to a project level Connection Manager outside of the context of an SSIS package. There's simply no editor available to you until you have an open SSIS package. But, once applied, all the packages in the project will be similarly configured.

Quirk of the IDE I suppose. Also, don't be alarmed by the lack of color in these screenshots, I'm running with the 2012 version of SSDT.

like image 192
billinkc Avatar answered Sep 24 '22 02:09

billinkc


i had the same problem and it was because the flat file source was set as a project source so i had to convert it into a package connection.

Initial flat file source

Right-click on the source and choose convert to package connection

Convert to package connection

Maybe this will help.

like image 37
Themba Mabaso Avatar answered Sep 21 '22 02:09

Themba Mabaso