Creating directory - Parent child package problem

  • I made a child package which will take a path from its parent and will create a directory or folder using that path. The parent path is passed into the child's strChildPath string variable. I set the parent path variable to

    NoPath. when I run the parent package, why do I get a folder called "NoPath" in my desktop ? I was expecting it to give me an error instead because "NoPath" is an invalid path.

    The whole goal behind this was to learn parent child package and then change the parent variable (using a package configuration) during deployment on a "production server".

  • What do you do with the variable strChildPath in the child package?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (10/8/2013)


    What do you do with the variable strChildPath in the child package?

    The child package merely creates a folder/directory using the path stored in strChildPath.

  • etl.laptop (10/8/2013)


    Koen Verbeeck (10/8/2013)


    What do you do with the variable strChildPath in the child package?

    The child package merely creates a folder/directory using the path stored in strChildPath.

    Not "what do you want to do with the variable", but "which steps are taken into the SSIS package that involve the variable".

    Where and how is it used?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (10/8/2013)


    etl.laptop (10/8/2013)


    Koen Verbeeck (10/8/2013)


    What do you do with the variable strChildPath in the child package?

    The child package merely creates a folder/directory using the path stored in strChildPath.

    Not "what do you want to do with the variable", but "which steps are taken into the SSIS package that involve the variable".

    Where and how is it used?

    Parent and child, each have a string (which is meant to hold a full directory path). Parent passes its strPath to child. Child creates the directory mentioned in that strPath. Also, the strPath of parent is set using a package configuration when it is deployed to another machine. Eg. Parent strPath in dev is C:\testing, but in deployment, it is configured to be Z:\Private\Testing.

    This whole exercise is for learning real deployment and related issues. Book exercises can only take me so far.

  • What is the actual value of the string in the parent? Does it change when you run the parent package? Are configurations still applied in your development environment?

    How exactly do you create the directory?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (10/8/2013)


    What is the actual value of the string in the parent? Does it change when you run the parent package? Are configurations still applied in your development environment?

    How exactly do you create the directory?

    strParentPath (which is meant to hold a folder path) is configured on the deployment server. It passes strParentPath to strChildPath. Child package merely executes a file system task to create a folder/directory, based on the value of strChildPath.

    Is that clearer now ?

  • etl.laptop (10/8/2013)


    Koen Verbeeck (10/8/2013)


    What is the actual value of the string in the parent? Does it change when you run the parent package? Are configurations still applied in your development environment?

    How exactly do you create the directory?

    strParentPath (which is meant to hold a folder path) is configured on the deployment server. It passes strParentPath to strChildPath. Child package merely executes a file system task to create a folder/directory, based on the value of strChildPath.

    Is that clearer now ?

    Configured how on the deployment server? 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Allright, I did a small test and it seems that if you do not specify a full path, but only a directory name, the directory is created in the directory where the SSIS package is saved.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply