コード例 #1
0
 public void LookupEasy(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output, Lib.ConnectionManager connection)
 {
     LibDF.Lookup Lookup = new LibDF.Lookup("Lookup Easy", connection, "SQL")
                           .AddComponent(dataFlow);
     new LibDF.Path(output, Lookup.DefaultInput).Connect(dataFlow);
     Lookup.AddReadOnlyInputColumn("ColumnName")
     .AddLookupMapping(new LibDF.LookupMapping("inputColumn", "lookupColumn"));
 }
コード例 #2
0
 private void CreateDestination(LibCF.DataFlow dataFlow)
 {
     _OLEDBDestination = new LibDF.OLEDBDestination(
         "Destination",
         new LibDF.OLEDBDestinationProperties(_OLEDBConnectionManager)
         .SetTableOrViewName("[temp].[Test]")
         ).AddComponent(dataFlow);
 }
コード例 #3
0
        //DataFlow Snippets

        public void ConditionalSplit(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output)
        {
            LibDF.ConditionalSplit cspl = new LibDF.ConditionalSplit("Catch value not null", "Valid value")
                                          .AddComponent(dataFlow);
            new LibDF.Path(output, cspl.DefaultInput).Connect(dataFlow);
            cspl.AddReadOnlyInputColumn("columnName");
            cspl.AddConditionalSplitItem("Value IsNull", "ISNULL(columnName)");
        }
コード例 #4
0
        public void OLEDBSource(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output, Lib.OLEDBConnectionManager connection)
        {
            var srcprops = new LibDF.OLEDBSourceProperties(connection)
                           .SetSqlCommand("Some SQL");

            LibDF.OLEDBSource source = new LibDF.OLEDBSource(
                "Source Name",
                srcprops)
                                       .AddComponent(dataFlow);
        }
コード例 #5
0
 public void DerivedColumn(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output)
 {
     LibDF.DerivedColumn drvc = new LibDF.DerivedColumn("Derive some columns")
                                .AddComponent(dataFlow);
     new LibDF.Path(output, drvc.DefaultInput).Connect(dataFlow);
     drvc.AddReadOnlyInputColumn("columnName");
     drvc.AddDerivedColumn(new LibDF.DerivedColumnItem("columnName",
                                                       "Expression", Lib.DataType.WSTR, 50));
     drvc.AddReadWriteInputColumn("column");
     drvc.AddDerivedColumn(new LibDF.DerivedColumnItem("excpressionAndColumn", "replaceColumnName"));
 }
コード例 #6
0
        public void Union(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output1, LibDF.OutputWrapper output2, LibDF.OutputWrapper output3)
        {
            LibDF.Union union = new LibDF.Union("Union Name")
                                .AddComponent(dataFlow);

            union.RenameLastInput("Input 1");
            new LibDF.Path(output1, union.DefaultInput).Connect(dataFlow);
            union.RenameLastInput("Input 2");
            new LibDF.Path(output2, union.FindInput("Input 2")).Connect(dataFlow);
            union.RenameLastInput("Input 3");
            new LibDF.Path(output3, union.FindInput("Input 3")).Connect(dataFlow);
        }
コード例 #7
0
        private void OLEDBDestination(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output, Lib.OLEDBConnectionManager connection)
        {
            LibDF.OLEDBDestination Destination = new LibDF.OLEDBDestination(
                "Destination Name",
                new LibDF.OLEDBDestinationProperties(connection)
                .SetTableOrViewName("dbo.Test")
                ).AddComponent(dataFlow);

            new LibDF.Path(output, Destination.DefaultInput).Connect(dataFlow);

            Destination.MapColumnsByMatchingNames();
            Destination.MapColumn(new LibDF.OLEDBDestinationMapping("ColumnNameA", "ColumnNameB"));
        }
コード例 #8
0
        public void LookupAdvanced(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output, Lib.ConnectionManager connection)
        {
            LibDF.Lookup lkp = new LibDF.Lookup(
                "Lookup", connection, "LOOKUP SQL",
                LibDF.NoMatchBehaviour.RedirectRowsToNoMatchOutput,
                LibDF.CacheType.Partial)
                               .AddComponent(dataFlow);

            new LibDF.Path(output, lkp.DefaultInput).Connect(dataFlow);

            lkp.AddReadOnlyInputColumn("inputColumn");
            lkp.AddLookupMapping(new LibDF.LookupMapping("inputColumn", "lookupColumn"));

            LibDF.LookupAdvancedParameters advPars = new LibDF.LookupAdvancedParameters("select Advanced SQL Query");
            advPars.AddParameter("Parameter");
            lkp.SetAdvancedParameters(advPars);
        }
コード例 #9
0
        private void CreateFlatFileSource(LibCF.DataFlow dataFlow)
        {
            _FlatFileSource = new LibDF.FlatFileSource(
                "Read from CSV",
                _FlatFileConnectionManager,
                true
                ).AddComponent(dataFlow)
                              .SetErrorOutputForAllColumns(LibDF.RowDisposition.RD_FailComponent, LibDF.RowDisposition.RD_IgnoreFailure);

            _FlatFileConnectionManager.AddAdvancedColumn(new Lib.FlatFileColumn()
            {
                DataType          = Lib.DataType.WSTR,
                OutputColumnWidth = 50,
                TextQualified     = true,
                Name       = "Column1",
                ColumnType = "Delimited",
            });
            _FlatFileConnectionManager.AdjustDelimiterForLastColumn();
            _FlatFileConnectionManager.AddExpression(new Lib.Expression("HeaderRowsToSkip", "2"));
        }
コード例 #10
0
 private void CreateTransformation(LibCF.DataFlow dataFlow)
 {
     _RowCount = new LibDF.RowCount("rc,hk - Count inserted rows", _RowCountVar)
                 .AddComponent(dataFlow);
 }
コード例 #11
0
 private void RowCount(LibCF.DataFlow dataFlow, LibDF.OutputWrapper output, Lib.Variable variable)
 {
     LibDF.RowCount RowCount = new LibDF.RowCount("RowCount", variable)
                               .AddComponent(dataFlow);
     new LibDF.Path(output, RowCount.DefaultInput).Connect(dataFlow);
 }