title: SSIS BIML Derived Column syntax for expressions
body: <p>I am defining a Derived Column transformation in BIML but I am having trouble referencing the output from the previous Excel Source in my Derived Column transformation. </p>
  
  <p>I receive the error upon opening the package after successfully generating the SSIS package and it suggests that it the Derived Transformation cannot find the output from the Excel Source.</p>
  
  <blockquote>
    <p>Error 2   Error loading AFR_ShareTableBIML.dtsx: The object
    "/DTS:Executable/DTS:Executables/DTS:Executable/DTS:ObjectData/pipeline/components/component/inputs/input/inputColumns/inputColumn/properties/property"
    references ID "#{Package\Data Flow {Import Share Table CSV}\Source
    {Flat File Share Table}.Outputs[Output].Columns[Div c per share]}",
    but no object in the package has this ID.</p>
  </blockquote>
  
  <p>Here is a code snippet:</p>
  
  <pre><code>&lt;Biml xmlns="http://schemas.varigence.com/biml.xsd"&gt;
  &lt;FileFormats&gt;
      &lt;FlatFileFormat Name="FFF_AFRShareTable" ColumnNamesInFirstDataRow="true"
              FlatFileType="Delimited" IsUnicode="false" TextQualifer="None" HeaderRowsToSkip="6"&gt;
          &lt;Columns&gt;
              &lt;Column Name="Quote Buy" ColumnType="Delimited" DataType="AnsiString" Length ="50" Delimiter=","&gt;&lt;/Column&gt;
              &lt;Column Name="Quote Sell" ColumnType="Delimited" DataType="AnsiString" Length ="50" Delimiter=","&gt;&lt;/Column&gt;
              &lt;Column Name="Div c per share" ColumnType="Delimited" DataType="AnsiString" Length ="50" Delimiter=","&gt;&lt;/Column&gt;
          &lt;/Columns&gt;
      &lt;/FlatFileFormat&gt;
  &lt;/FileFormats&gt;
  &lt;Connections&gt;
      &lt;FlatFileConnection Name="FF_AFRShareTable" FileFormat="FFF_AFRShareTable"
          FilePath="C:\Temp\Stocks.csv"&gt;&lt;/FlatFileConnection&gt;
      &lt;OleDbConnection Name="CMD DB"
          ConnectionString="Data Source=Localhost;Initial Catalog=DB;Provider=SQLNCLI11.1;Integrated Security=SSPI;" CreateInProject="true"&gt;
      &lt;/OleDbConnection&gt;
  &lt;/Connections&gt;
  &lt;Packages&gt;
      &lt;Package Name="AFR_ShareTableBIML" ConstraintMode="Linear" ProtectionLevel="DontSaveSensitive"&gt;
          &lt;Tasks&gt;
              &lt;ExecuteSQL Name="SQLTask {OLE_DB} Truncate Security Share Table" ConnectionName="CMD DB"&gt;
                  &lt;DirectInput&gt;truncate table Staging.SecurityShareTable&lt;/DirectInput&gt;
              &lt;/ExecuteSQL&gt;
              &lt;Dataflow Name="Data Flow {Import Share Table CSV}"&gt;
                  &lt;Transformations&gt;
                      &lt;FlatFileSource Name="Source {Flat File Share Table}" ConnectionName="FF_AFRShareTable"&gt;&lt;/FlatFileSource&gt;
                      &lt;DerivedColumns Name="DER_NullifyColumns"&gt;
                          &lt;Columns&gt;
                              &lt;Column Name ="DER_DPS" DataType = "Decimal" Precision="4"&gt;
                                  [Div c per share] == "-" ? NULL(DT_DECIMAL, 4)  : (DT_DECIMAL, 4)[Div c per share]
                              &lt;/Column&gt;
                          &lt;/Columns&gt;
                      &lt;/DerivedColumns&gt;
                  &lt;/Transformations&gt;
              &lt;/Dataflow&gt;
          &lt;/Tasks&gt;
      &lt;/Package&gt;
  &lt;/Packages&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have already defined the column name via the <code>FlatFileFormat</code> and I have confirmed that the expression in the <code>DER_DPS</code> column is is syntactically correct. I found that through replacing the square brackets "[" and "]" with double apostrophes, the SSIS package can be opened. For example:</p>
  
  <pre><code>"Div c per share" == "-" ? NULL(DT_DECIMAL, 4)  : (DT_DECIMAL, 4) "Div c per share"
  </code></pre>
  
  <p>However there are derived column transformation errors on incorrect syntax. Are square brackets special characters in BIML that I need to escape?</p>