feat(transformations): add Fabric OneLake external data sources API#2713
Draft
Khyat-Cognite wants to merge 5 commits into
Draft
feat(transformations): add Fabric OneLake external data sources API#2713Khyat-Cognite wants to merge 5 commits into
Khyat-Cognite wants to merge 5 commits into
Conversation
Adds client.transformations.external_data_sources as a new sub-resource under TransformationsAPI, enabling users to register, list, verify, and delete Fabric OneLake external data sources for use in transforms. OneLake sources are read-only — transforms read from OneLake tables via ext_onelake() SQL but writing back to OneLake is not supported. New public surface: - ExternalDataSourceWrite.onelake() factory for creating sources - client.transformations.external_data_sources.upsert() - client.transformations.external_data_sources.list() - client.transformations.external_data_sources.delete() - client.transformations.external_data_sources.verify_usability() - TransformationsExternalDataSourcesAcl capability class (READ/WRITE) Implementation follows the existing schedules/notifications sub-resource pattern: three-layer Core/Read/Write data class hierarchy, WriteList companion, sync wrapper generated from the async API, and autospec mock support in CogniteClientMock. Integration tests are local-only (require work/jetfire-backend/.env with Fabric credentials) and skip automatically in CI.
…ourcesAcl The /usability endpoint requires USE ACL on the backend — grants Spark driver access to verify credentials without granting full WRITE.
Align sync codegen hashes, docs stubs, list mixins, and HTTP mocks with jetfire external_data API behavior; fix Fabric integration env var names. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove unpublished api-docs URLs from docstrings, apply ruff formatting, reorder data class exports, and refresh sync codegen hash. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2713 +/- ##
==========================================
+ Coverage 93.09% 93.61% +0.52%
==========================================
Files 490 509 +19
Lines 49869 51509 +1640
==========================================
+ Hits 46424 48220 +1796
+ Misses 3445 3289 -156
🚀 New features to boost your workflow:
|
External data classes are documented on transformations_external_data.rst; keeping the automodule in transformations.rst caused 23 Sphinx duplicate object warnings that fail linkcheck. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client.transformations.external_data_sourcessub-resource withupsert(),list(),delete(), andverify_usability()methodsext_onelake()SQL; writing to OneLake is not supportedschedules/notificationssub-resource pattern: Core/Read/Write data class hierarchy, WriteList companion, sync wrapper, autospec mock supportTransformationsExternalDataSourcesAcl(READ/WRITE actions) to capabilitiesNew public surface
Files changed
cognite/client/data_classes/transformations/external_data.py— new data classescognite/client/_api/transformations/external_data.py— async APIcognite/client/_sync_api/transformations/external_data.py— sync wrappercognite/client/data_classes/capabilities.py—TransformationsExternalDataSourcesAclcognite/client/testing.py— mock spec for both async and sync clientsdocs/source/transformations_external_data.rst— Sphinx docs.envis absent)Test plan
pytest tests/tests_unit/test_data_classes/test_transformations/test_external_data.py tests/tests_unit/test_api/test_transformation_external_data.py -vpython -c "from cognite.client.data_classes import ExternalDataSource, ExternalDataSourceWrite"python -c "from cognite.client.testing import CogniteClientMock; m = CogniteClientMock(); print(m.transformations.external_data_sources)"python -c "from cognite.client.data_classes.capabilities import TransformationsExternalDataSourcesAcl"work/jetfire-backend/.env):pytest tests/tests_integration/test_api/test_transformations/test_external_data.py -vNotes
work/jetfire-backend/.envis absent. Adding Fabric credentials to SDK CI secrets is future work.dataSetIdvsdatasetIdcasing should be verified at integration test time (see architecture notes in the implementation)._capability_name = "transformationsExternalDataSourcesAcl"should be verified against the backend IAM configuration.poetry/ruffunavailable locally).