Getting SourcesNotImportedToRepository error when using @external_systems decorator. Sources are in transforms-shrinkwrap.yml but build still fails.
How do I properly import Data Connection sources into a Python transforms repository?
Getting SourcesNotImportedToRepository error when using @external_systems decorator. Sources are in transforms-shrinkwrap.yml but build still fails.
How do I properly import Data Connection sources into a Python transforms repository?
Hey, Janardhan!
This error means the source exists in Data Connection but hasn’t been fully authorized for use in your repository. Having it in transforms-shrinkwrap.yml is not enough, there are three independent toggles that all need to be on:
1. Enable code import on the source itself
In Data Connection, open your source → go to Connection settings > Code import configuration → toggle on Allow this source to be imported into code repositories.
This is the most commonly missed step. The source must explicitly opt in to being used in code.
2. Enable external systems on the repository
In your Code Repository → Settings tab > Repository > External systems → toggle on Allow access to external systems from this repository.
Note: this toggle requires the Information Security Officer role in Foundry. If you don’t have it, you’ll need to ask someone who does (it’s managed in Control Panel).
3. Import the source into the repository
With both toggles on, go to your repository and explicitly import the source. The @external_systems decorator references the source object, not just its name — the import step is what makes that reference resolvable at build time.
A note on the legacy decorator:
If you previously used @use_external_systems, be aware that you cannot mix both decorators in the same repository. The new @external_systems decorator with source references is the current supported approach, and the two are mutually exclusive per transform.
Felipe Montes
Development Advisor
Follow me @ linkedin.com/in/felipemontesl/ or GitHub: Brazillianerd
Thank you @montes. I was able to resolve my issue.
Thanks for letting me know. If possible, please mark my response as the solution to help others in the community who may encounter the same issue
Have a great day!