Creating project using Metadata SnapLogic Create snap

At GameStop we are leveraging a custom solution/pipeline to handle code migration and deployment from one environment to another. We are using Metadata List snap to list projects, accounts, pipelines, tasks from source project then using Metadata Create snap to recreate them in target environment (by specifying org/projectspace/project information). This solution seems to be working fine for all asset types: Account, Pipeline, Task. However it is failing for asset type PROJECT where I am always getting the same error: Error creating asset /GameStop/projects/TargetProject, Reason: Absolute path required when I try to create a any new project.

Did anyone stumble upon that error before: Absolute path required ?? I know that I am using the right absolute path correctly because it is working fine for other asset type: Account, Task, Pipelines. So why I cannot use it to create target project?

1 Like

[quote=“mohamadelmardini, post:1, topic:391”]
/GameStop/projects/TargetProject
[/quote] would mean you are trying to create a project inside a project. If you just used /GameStop/projects, is a project created?

Have you verified that you have permission to create projects in that org? Also, double check to make sure you have the correct t options set.

To your first question, I am not creating a project within a project because in that path: /GameStop/projects/TargetProject, projects is a project space and already exist. I am trying to create TargetProject inside the already exiting projects space. I have all rights and permissions to create and delete projects in that dev org.

You are correct about my first question. I was thinking of something else.

I know other’s have seen the message you are seeing if they have forgotten to change the asset type. Otherwise, try removing the leading /. I was able to create a project for my path org/projects/projectname, but saw the same message if the path was /org/projects/projectname.

The leading / (forward slash) is needed because it has to be an absolute path. I tried to remove it but I got an error complaining about invalid asset_type because it has to be a Dir: Failure: Invalid asset_type, expected “Dir”, Reason: Invalid asset_type, expected “Dir”

Any particular reason you have the expression toggle selected?
For me, the following path works for creating a new project:

1 Like

I have the expression toggle selected because I am using a quotation in between because at runtime real use case I have using arguments combined with text. But it doesn’t matter I am still getting that error regardless when I remove it below

It might be a glitch in the system if it is working for you and not my org. I will submit a ticket to support desk.

Please Work with Alex Panganiban. He has worked integration with GitHub as well.

We have a working solution for this task of creating a new “Project” asset using the “SnapLogic Create” snap:

  1. Ensure that the user account attempting to complete this task has “Full-access” to “/” to be able to create a new project asset

  2. Create a pipeline with the following sequence of snaps:
    “SnapLogic Read” > “SnapLogic Create”

SnapLogic Read: Read from an existing project path
SnapLogic Create: Specify the target/actual project to be created. [ // ]

2 Likes

Thank you but this is different than the GitHub integration. Alex was also stuck on this one creating a project at runtime but the issue is resolved now. I worked with Sriram on it. I just made one suggestion for Sriram to fix the existing SnapLogic documentation ( http://doc.snaplogic.com/com-snaplogic-snaps-snaplogic-create_1 ) for the absolute path to remove the leading forward slash ‘/’ from the example because it will throw error when it is there when attempting to create a project.

1 Like

Hi Mohamad,

I am facing same issue when I try to automate project creation. What was the solution provided by SnapLogic team? Do I need to submit a ticket?

Attached is a sample pipeline that should be helpful for creating “Projects” using the SnapLogic Metadata snaps.

SnapLogic Read: Read from an existing project path
SnapLogic Create: Specify the target project to be created. Example: org/project_space_name/project_name

SnapLogic Create - Project_2017_05_10.slp (2.9 KB)

@sriram In my case I am trying to create new project on provided org. I am just using SnapLogic create snap not read snap.

Currently, to be able to create a new project using the SnapLogic metadata snaps, having “SnapLogic Read” > “SnapLogic Create” is a definite requirement as the “SnapLogic Read” snap is the one responsible for passing metadata related information (org names, users, acls, etc.,) to the downstream “SnapLogic Create” snap. This rule applies for both creating new projects within (or) across orgs to which you have access to. So, in your case, following the “Router” snap (output 0), you would need to add the “SnapLogic Read” snap followed by the “SnapLogic Create” snap.

Hope this helps.

@sriram thanks. It worked :slight_smile: