Forum Discussion

dmiller's avatar
dmiller
Former Employee
8 years ago

Migration Patterns

The following patterns migrate assets from one project to another in the same org. These patterns make use of the SnapLogic Metadata Snaps.

Source: Existing accounts, files, and pipelines within SnapLogic
Target: A second project within SnapLogic
Snaps used: SnapLogic Metadata Snaps, Mapper,

Requirements

  • You must have access to both projects.
  • You will need to define the following pipeline parameters:
    • source_path, in the form of /orgname/projectspace/project
    • target_path, in the form of /orgname/projectspace/project

Migrate Accounts

  • The SnapLogic List Snap gathers the list of accounts in the specified source_path parameter.
  • The SnapLogic Read Snap reads the incoming $path for the accounts.
  • The Mapper Snap maps the target path.
  • The SnapLogic Create Snap writes the accounts to the target location.

Migrate Files

  • The SnapLogic List Snap gathers the list of files in the specified source_path parameter.
  • The Mapper Snap maps the source path to a $source_path field for use in the Read Snap.
  • The SnapLogic Read Snap reads the incoming $path for the files.
  • The SnapLogic Create Snap writes the files to the target location.

Migrate Pipelines

  • The SnapLogic List Snap gathers the list of pipelines in the specified source_path parameter.
  • The SnapLogic Read Snap reads the incoming $path for the pipelines.
  • The Mapper Snap maps the target path.
  • The SnapLogic Create Snap writes the pipelines to the target location.

Pipeline Downloads

9 Replies

  • kichcha's avatar
    kichcha
    New Contributor II

    Hello,
    Is it possible to rename a project space or folder using metadata update snap?

  • How can we migrate files between orgs without using the Migrate function on the project in Manager? I have tried various methods to read/delete/browse/write files in the source and target orgs with and without accounts that have full access to the source and target orgs. But the files can only be seen by snaps and in Manager when the snap that creates or reads them is executed in the same org. The files can be successfully written by the source org into the target org but snaps executing in the target org cannot see them and vice versa. (Permissions cannot be set on SLDB files by the File Writer snap.) Nothing is working unless I create separate pipelines and tasks for each function (Directory Browser, File Writer) on the target org and call those from the source org with the Rest POST snap so that they are executed on the target org. This seems extremely complicated for a seemingly simple task of deploying files. What am I missing?

  • omair's avatar
    omair
    Contributor

    Thanks so much @dmiller.

    We’re also interested in the following patterns:

    • a migration pattern that would copy over tasks from a source project to a target project and additionally replace the bearer tokens on the copied tasks with a new randomly generated bearer token.
    • a pattern demonstrating how to create a user-specified project or project space.

    Thanks!

  • dmiller's avatar
    dmiller
    Former Employee

    @omair, I’m asking Dev about the first request to see if it’s possible.

    Regarding creating a user-specified project or project space, do you mean a project other than the project created when the user is first created?

  • jcampion's avatar
    jcampion
    New Contributor III

    The Migrate Files pipeline did not work for me. Apparently the File Writer currently cannot write to orgs other than the one it’s in.

  • Szymon's avatar
    Szymon
    New Contributor II

    Migrate Files definitely does not work.
    I am not sure if this is another BUG, but the File Writer result says “overwritten”, no error whatsoever.
    I am tired of creating tickets 🤢
    Everything you touch on snaplogic seems to be buggy 😭

    {
    “filename”: “sldb:///myotherorg/myspace/myproject/file.name”,
    “result”: “overwritten”
    }

    • dmiller's avatar
      dmiller
      Former Employee

      @Szymon

      The following patterns migrate assets from one project to another in the same org.

      Are you trying to write to a different org or are you seeing this error when trying to write to a different project in the same org?

      • Szymon's avatar
        Szymon
        New Contributor II

        Ahh! Now I see. Apoligies for not reading correctly.
        Clever naming, really, that try to cover missing functionalities, well done!
        I am not sure if snaplogic is aware of it, but since 1970’s, there was some progress in IT.
        Requirements, like migrating/deploying/etc. single objects/assets/etc.(and not whole projects with all the assets) from one stage to another (e.g. dev → uat, uat → prod, etc.) are already standard in integration platforms nowadays.
        But I recon snaplogic is first at stage of copying objects only in within one stage. AND it requires custom development, really advanced!

        So, this seems to confirm it as a bug, that even though file writer says “overwritten”, file is not being written, therefore it is not there.
        {
        “filename”: “sldb:///myotherorg/myspace/myproject/file.name”,
        “result”: “overwritten”
        }
        No furhter questions.
        kind regards!