SSIS 2012 - Parent/Child Package "Object" Type Variables

How do I pass Variables of Object type from Parent to Child packages?
I am using the SSIS 2012 project deployment model.

You can do it as outlined in
When you need an object it is typically a recordset, then just pass the results, or execute the query in a package.
Arthur My Blog

Similar Messages

  • What target property must be specified while passing a object type variable to child package in SSIS 2012

    What target property must be specified while passing a object type variable to child package in SSIS 2012???

    As shown below, there is variable strVar and it's Value property is selected. Likewise you have to select the property that you need to pass.
    Please refer:
    -Vaibhav Chaudhari

  • Event logging in Parent-Child packages

    I have a set of Parent-Child SSIS packages. A Parent package invokes a bunch of child packages via "Execute Package Tasks".
    I have set up custom event logging (to a SQL table) inside both Parent and Child Packages' Event Handlers (OnPreExecute, OnPostExecute, OnError).
    I noticed that when a Child Package raises an event, both the Child Package's event handler and the Parent Package's event handler get fired, thereby creating duplicate event logging entries.
    So, as a quick work around, I disabled event handlers in Child packages hoping that the Parent Package's event handlers will catch and log all events nicely. However, when the Parent Package's event handler writes event details to the table, it uses the
    Parent Package's System::PackageId, System::PackageGUID and System::PackageName rather than that of the Child Package that originally raised the event!. So, my event log table records all events as if they were raised by the Parent Package!
    Is it possible to disbale event bubbling up from Child Packages to the Parent package?
    What options do I have to fix this problem?

    I came across this same issue and found a pretty nice workaround.
    In brief, I used a Stored Procedure to write the OnError to a Logging table. So when this stored procedure was called I checked if the error was already in the logging table, and if it was then no record would be inserted.
    I was already using the logging method 2 detailed here with a few changes.
    To the PackageLog table I added a ParemtExecutionID value, which was passed into the child package through a Parent Variable Configuration. So for the OnPreExecute handler, the Parent Package passed NULL for the ParemtExecutionID, but the Child Package passed
    in the Variable.
    In the ErrorLog table I added a SourceID column, which is the GUID of the task that generated the error. In the Parent/Child Package configuration, the SourceID is the same in both OnError handlers.
    So then when the Parent OnError handler calls the stored procedure, it checks if an ErrorLog record exists for the ParentExecutionID and SourceID combination.
    Below is the OnError Stored Procedure I used. (Note: In my example only the Child Package has a Queue ID value.)
    Create Procedure [dbo].[usp_Integration_Log_Error] (
    @Queue_Id INTEGER = NULL,
    @Source_Name VARCHAR(255),
    @Err_Code INTEGER,
    @Err_Message NVARCHAR(MAX)
    IF @Queue_Id IS NULL
    @ErrorCount = Count(*)
    IE.SOURCE_ID = @Source_Id
    IF ISNULL(@ErrorCount,0) = 0
    VALUES (

  • Parent/Child Master Data Type

    I recently created a new master data type in my model, which included one attribute with the 'parent' check box checked - to signify that it was to be used as the parent.
    Upon activating the master data type - the system auto generated several other attributes within the master data type.  My question is, what is the purpose of these additional attributes and how are they to be used?
    Before Activation:
    << marked as key and as required
    << no special check boxes checked
    Parent ID
    << marked with parent check box
    After activation:
    << marked as key and as required
    << no special check boxes checked
    Parent ID
    << marked with parent check box
    Ancestor: ID
    << auto added after activation
    Level: ID
    << auto added after activation
    Ancestor: Level: ID
    << auto added after activation
    Path: ID
    << auto added after activation
    Ancestor: Path: ID
    << auto added after activation
    Ancestor: Description
    << auto added after activation
    Ancestor: Parent ID
    << auto added after activation
    Hey JJ,
    The purpose of these attributes is for parent-child hierachy relationship.
    In addition to above mentioned attributes, you should also notice (via HANA studio), that another Planning object gets generated automatically.  The new planning object should be the name of your parent-child object plus "_ANC" prefix at the end.
    If you take a look at this planning object, you will notice that the object contains all the generated attributes (your attriubute plus "A" prefix at the end) in the definition.
    Once you load data into your parent-child hiearchy object the "_ANC" object will automatically get populated with parent-child node relationship.
    "A-prefix" attriubutes essentially represents the attributes of ancestor in this case.
    In addition, in order to do Ancestor rolllup in your calculation you will also need to create an ancestor planning level which contains all the attriubutes of your base planning level as well as these "A-Prefix" attributes.
    Please take a look at the document we created for "How to configure Parent-Child Hiearchy" from the share link
    It has more detailed information.

  • Assign value to Object type variable

    empid NUMBER,
    age NUMBER,
    dob date);
    Pls hlep me assign value to the object type variable in loop..(assume there is 5 10 records in emp table)
    v_emp_tt emp _tab ;
    for i in (select empid ,age ,dob from emp ) Loop
    v_emp_tt := i.empid; --this is wrong pls help me correct it.
    end loop;

    I would keep the type/object naming convention distinct from the table name.
    In terms of assignment:
    (empid NUMBER,
    age NUMBER,
    dob date);
    v_emp tt_emp;
    select to_emp_obj(emp_id, age, dob)
    bulk collect into v_emp
    from emp;

  • How can I obtain an object-type variable in Forms 6i?

    i create an object-type in oracle 8i database like this:
    i create a variable of this object-type in a stored procedure in Oracle 8i:
    v_Number OBJ_TYPE_NUMBER(10);
    and then call it's method:
    it work's!
    But when I try to compile a previous variable declaration
    (v_Number OBJ_TYPE_NUMBER;) in Oracle Forms 6i I see only an error message.
    So my question is How can I declare and use an object-type variable in Forms 6i?

    the release after Forms 6i is Forms9i. Forms9i does have the PLSQL engine of Oracle database which means that it should knwo how to handle object types in PLSQL.

  • Transport of a package object type DEVC

    when I create a transport task manually with package (object type DEVC) in SE10, does it
    a) only transport the package definition again
    b) transport the package and all the objects in it?
    Thanks in advance for your help!

    When you transport the package it transports the package and all the objects in it.

  • Can't access packaged object type in Java

    I am getting the following error while accessing an oracle packaged object type. Can You please give me an advise..!!
    java.sql.SQLException: invalid name pattern: XXGW_RMA_CREATION_PKG.XXGW_RMA_RECRegards

    I am not asking how to search in google. If You know how to resolve my problem..then help me. I don't what this kind of answers.
    This is my problem
    Error in java.
    java.sql.SQLException: invalid name pattern: XXGW_RMA_CREATION_PKG.XXGW_RMA_REC
    This is my package
    create or replace package xxgw_rma_creation_pkg
    type xxgw_rma_rec is record (dealer_name varchar2(40), dealer_desc varchar2(300));
    type xxgw_rma_line is table of xxgw_rma_rec; --(item_name varchar2(40), item_desc varchar2(300)) index by binary_integer;
    xx_rma_rec  xxgw_rma_rec;
    xx_rma_line xxgw_rma_line
    procedure xxgw_rma_creation (p_rma_rec in xxgw_rma_rec ,p_rma_line in xxgw_rma_line,p_rma_no out varchar2);
    create or replace package body xxgw_rma_creation_pkg
    procedure xxgw_rma_creation (p_rma_rec in xxgw_rma_rec ,p_rma_line in xxgw_rma_line,p_rma_no out varchar2)
    l_rma_rec xxgw_rma_rec := p_rma_rec;
    l_rma_line xxgw_rma_line := p_rma_line;
    dbms_output.put_line(l_rma_rec.dealer_name||'  '||l_rma_rec.dealer_desc);
    for i in  l_rma_line.first..l_rma_line.last loop
    dbms_output.put_line(l_rma_line(i).dealer_name||'  '||l_rma_line(i).dealer_desc);
    end loop;
    p_rma_no := '20';

  • Problem with saving Parent - Child  View Objects in ADF 11g.

    Hi Every one,
    I have a requirment, something like I will be displaying some data on my jsff screen based on one Transient View Object. Whenever user clicks on Save button, I have to do following steps in my AMImpl.
    -> Preapre dynamically Parent View Object Rows based on some logic
    -> Prepare dynamically Child View object Rows and invoke insertRow method on respective child view object.
    When I say commit() First Parent ViewObject data need to be saved and then Child View object data has to be saved. I am having Parent - Child Key relation ship btw these two ViewObjects. Some how I am populating the Parent Primary key in the Child View Object. Please suggest me If there is any other alternative to this.

    I got the solution, Enabling the check box option for Master - Detail Entity association (CompositionAssociation -> Cascade Update Key Attributes) resolved the issue.

  • Parent Child Hierarchy for Type 2

    I have read the articles on Parent Child hierarchy setup in OBIEE 11g, however, most are based on what seems to be a current snapshot of the Employee-Manager relationship. Has anyone tried to build out a Parent-Child hierarchy/table off a Type 2 dimension. Being able to navigate what the hierarchy may have been on a specific date.
    I would welcome any feedback, thanks.

    Thanks for the reply, I'm actually using snapshots. But even with the Type 2 Dim I don't think it will work.
    When OBIEE generates the very first sql against the Parent-Child table the fact table is not included in the query. It seems to create 2 queries - one to find the top level parent (ancestor key is null) and then one to find all the leaf nodes.
    It does not have any join to the fact table when it does this. So if you have multiple rows in the table (with date stamps) for a single row (person in this case) - it picks up both rows. Therefore, when you have a person who was, say, promoted to manager, and WAS a leaf node, and is now a manager, they show up in the leaf query and don't display in the hierarchy as a manager.
    Once it has the leaf nodes and it joins to the fact table everything works (ie the surrogate key join).
    I'm trying to figure out if there is any way to influence those initial queries against the parent-child table.
    Hopefully that made sense.

  • Object type variable - Help !

    I want to achieve following outcome:
    Create a object type e.g.
    CREATE TYPE employees AS OBJECT (
    employee_id NUMBER(6),
    first_name VARCHAR2(20)
    Then create a table type e.g
    CREAT TYPE emp_table AS TABLE of employees;
    So far so good.
    Now I want to declare a variable of emp_table type in my
    procedure and then populate it using a select clause.
    Something like this:
    my_employees emp_table;
    insert into my_employees select id, name from table1 where id < 50;
    Where table1 is some permanent table in my database.
    I am not able to figure out how to achieve this.
    I dont want to create a permanent table in my database for this.
    I want to keep this table type variable in memory and discard it at the end
    of the procedure.
    Please help

    SQL> CREATE TYPE employees AS OBJECT (
      2  employee_id NUMBER(6),
      3  first_name VARCHAR2(20)
      4  );
      5  /
    Type created.
    SQL> CREATE TYPE emp_table AS TABLE of employees;
      2  /
    Type created.
    SQL> declare
      2   my_employees emp_table := emp_table();
      3  begin
      4   select employees(empno,ename) bulk collect into my_employees from emp;
      5  end;
      6  /
    PL/SQL procedure successfully completed.Rgds.

  • Single XML configuration file for all the SSIS packages(including parent and child packages)

    I have some 16 ssis packages. source Db and destination Db for these packages are common. I am calling these child packages in a master package.
    I want to use only one XML config file for this master.
    How do i use same for all child packages?
    and can i do it with parent package variable?

    I created a master package with a variable master, and in value i have entered the configuration file path.
    Hi vjp dinu,
    You should create variables in the parent package to pass values to variables in each child package rather than pass the file path of the XML Configurations file of the parent package.
    As Visakh mentioned, you can achieve your goal by creating corresponding variables in the parent package for each child package, and enable Package Configurations for the parent package so that you can control the values through the XML Configurations file
    for the variables of the parent package.
    Supposing there is a variable FilePath in child package 1, a variable ServerName in child package 2, then, we need to create two variables pFilePath, pServerName in the parent package. After configuring the Parent package variable in each child package (e.g.
    mapping pFilePath to FilePath, pServerName to ServerName), you can enable XML Configurations for the parent package, and expose the value property for both pFilePath and pServerName variables. In this way, you can modify the XML Configurations file of the
    parent package and the specified values will passed to the child packages.
    Mike Yin
    TechNet Community Support

  • Error running child packages from parent package - Error 0xC0011008

    I am running a parent SSIS package (running sp2, 9.0.3042) that calls several child packages.
    On our development server, we now cannot run this because we get 1 or more of these errors:
    "Error 0x80004003 while preparing to load the package. Invalid pointer  .  "
    "Error 0xC0011008 while preparing to load the package. Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.  .  "
    It is not occuring on the same packages.  It varies every time it is run.
    I can run every one of the child packages individually, using the same login ID that the parent is executed under.
    The parent package works fine on my local machine and other servers running the same version of SSIS.  Just not on this server.
    Does anyone have any ideas???

    I have the same error with no parent child package relationship. I have changed the "Max Concurrent Executables" in each package from -1 to 10 and got  no change.  My code is below:
    <string> fileList = new List<string>();
    void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
    void button1_Click(object sender, EventArgs e)
    string @fileName;
    foreach (string str in fileList)
    @fileName = str;
    string pkgLocation;
    Application app;
    DTSExecResult pkgResults_Sql;
    pkgLocation =
    @"C:\" + @fileName + ".dtsx";
    app =
    new Microsoft.SqlServer.Dts.Runtime.Application();
    Package pkgIn = new Package();
    pkgIn = app.LoadPackage(pkgLocation,
    pkgResults_Sql = pkgIn.Execute();

  • Master child Package Example package

    Hi Experts,
    Can any of you guys please send some sample packages for master - child packages (dtsx files) which includes all configuration from an xml file to [email protected]?
    XML conf --> Master --> Childs
    I am new to SSIS and i just wanted to have a look at the options in those packages.

    Hi Mukejee,
    To setup the association between the parent package and child package, there are two approaches:
    Through passing variables. Specify the child package for the Execute Package Task in the parent package, and then add a Parent package variable type configurations in the child package.
    Through passing parameters. Specify the child package for the Execute Package Task in the parent package, and map the parent parameters and the child parameters. No additional actions are needed in the child package.
    Besides, the XML Configurations for a package is not affected by the factor that whether it is a parent/child package of another package or not.
    Here, I have created two SSIS 2012 packages with the parent-child relationship that you can download from my
    SkyDrive. In the parent package, I create a variable VarMaster with the value “This is a parent package variable.” In the child package, I create a variable VarChild with the value “This is a child package variable”, and use a Script Task to display the
    value of the VarChild variable. You can see that the Script Task returns different values when we run the parent package or run the child package. 
    Mike Yin
    TechNet Community Support

  • Iterating inside a script task - SSIS 2012

    in order to create SSAS partitions I need to read a SQL Server table where I've year and month value.
    So I think to iterate for each row inside the data set returned by the read operation and for each year and month value to create a SSAS partition.
    Is it better to read the SQL Server table outside the script task? How can I iterate for each row in the dataset inside the script component?
    Any suggests to me, please?

    I've done similar requirement as below
    1. Create a object type variable
    2. Use Execute sql task to populate the recordset with partition information from the query. Use resultset option as Full resultset and map to object variable with index 0 in resultset tab
    3. Use a For Each Loop with ADO enumerator and map to object variable. Then have variables inside to get individual field values
    4. Add script task inside loop and pass the variables inside and use it to build your script task for partition processing. If you want you can also use analysis services DDL task for this too.
    Also see these for more info
    Please Mark This As Answer if it helps to solve the issue Visakh ----------------------------

Maybe you are looking for

  • Re: VAT Calculation in UK Localization

    Last month I requested help on VAT calculation in UK Localization; for which I received a helpful explanation from Rajiv Agarwalla.  Here is the link... VAT Calculation in UK Localization Now I require a SDK help on this... I am creating a Purchase O

  • Can somoene please help me get all my pannels back?

    I was clicking on remove panels for one screen now all of them are gone. I just want it to go back to the original view  so that I can see everything like it was when I first started my project. Can someone please help me with that? How do I get back

  • Sap script (ABAP-HR)

    hi friends, plz give me the solution to the following, its urgent yar. in abap we are copy a script from client 000 and done the modification according to the requirement, thn we go for NACE in that we remove the standard script name and we give our

  • Powershell 4.0 How to use Add-Printer to add printer for all users (machine)

    Is there a way I can use Powershell 4.0 Add-Printer cmdlet to add a printer for all users (machine)?  I tried from an admin account but it only adds a printer for the currently logged on user. thanks.

  • How to install firefox in Ubuntu

    I'm using Ubuntu 10.10 Netbook and I can't figure out how to install Firefox 4. It hasn't auto-installed from the tar.bz2 file. Thanks!!