Esempio n. 1
0
        public Lookup SetAdvancedParameters(LookupAdvancedParameters advanced)
        {
            this.Advanced = advanced;

            if (Advanced.HasSqlCommandParam)
            {
                ComponentWrapper.SetComponentProperty("SqlCommandParam", Advanced.SqlCommandParam);
                if (Advanced.HasParameters)
                {
                    string parameterMap = string.Join(";", Advanced.Parameters.Select(par => "#" + FindSSISInputColumn(par).LineageID.ToString())) + ";";
                    ComponentWrapper.SetComponentProperty("ParameterMap", parameterMap);
                }
            }

            if (Advanced.HasCacheSize32Bit)
            {
                ComponentWrapper.SetComponentProperty("MaxMemoryUsage", Advanced.CacheSize32Bit);
            }

            if (Advanced.HasCacheSize64Bit)
            {
                ComponentWrapper.SetComponentProperty("MaxMemoryUsage64", Advanced.CacheSize64Bit);
            }

            if (Advanced.HasNoMatchCachePercentage)
            {
                ComponentWrapper.SetComponentProperty("NoMatchCachePercentage", Advanced.NoMatchCachePercentage);
            }

            return(this);
        }
        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);
        }