mage-ai 0.9.46__py3-none-any.whl → 0.9.48__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/api/operations/base.py +27 -5
- mage_ai/api/policies/GlobalHookPolicy.py +1 -1
- mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
- mage_ai/api/policies/OauthPolicy.py +6 -6
- mage_ai/api/presenters/GlobalHookPresenter.py +1 -1
- mage_ai/api/presenters/IntegrationSourcePresenter.py +9 -2
- mage_ai/api/presenters/PipelinePresenter.py +3 -0
- mage_ai/api/presenters/PipelineRunPresenter.py +8 -3
- mage_ai/api/presenters/PipelineSchedulePresenter.py +22 -1
- mage_ai/api/resources/BlockResource.py +5 -0
- mage_ai/api/resources/DataProviderResource.py +2 -0
- mage_ai/api/resources/IntegrationSourceResource.py +149 -2
- mage_ai/data_integrations/sources/constants.py +5 -0
- mage_ai/data_integrations/utils/scheduler.py +57 -2
- mage_ai/data_preparation/executors/block_executor.py +30 -2
- mage_ai/data_preparation/executors/pipeline_executor.py +19 -4
- mage_ai/data_preparation/models/block/__init__.py +75 -32
- mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
- mage_ai/data_preparation/models/block/data_integration/mixins.py +6 -6
- mage_ai/data_preparation/models/block/data_integration/utils.py +198 -39
- mage_ai/data_preparation/models/block/sql/bigquery.py +2 -2
- mage_ai/data_preparation/models/block/sql/snowflake.py +2 -2
- mage_ai/data_preparation/models/block/sql/trino.py +2 -2
- mage_ai/data_preparation/models/block/sql/utils/shared.py +20 -3
- mage_ai/data_preparation/models/block/utils.py +53 -29
- mage_ai/data_preparation/models/global_hooks/constants.py +50 -1
- mage_ai/data_preparation/models/global_hooks/models.py +148 -84
- mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
- mage_ai/data_preparation/models/pipeline.py +7 -0
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
- mage_ai/data_preparation/models/project/__init__.py +0 -2
- mage_ai/data_preparation/preferences.py +29 -18
- mage_ai/data_preparation/repo_manager.py +12 -2
- mage_ai/data_preparation/sync/__init__.py +2 -0
- mage_ai/data_preparation/templates/constants.py +14 -0
- mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
- mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
- mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
- mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/chroma.py +162 -0
- mage_ai/io/config.py +8 -0
- mage_ai/orchestration/db/models/schedules.py +169 -34
- mage_ai/orchestration/pipeline_scheduler.py +59 -89
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{4366-93e09e5a4a7e182c.js → 4366-3e52497942acbafe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/6285-e9b45335bfb9ccaf.js → frontend_dist/_next/static/chunks/6285-648f9a732e100b2f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7858-d9df72e95e438284.js → frontend_dist/_next/static/chunks/7858-26a5a5d04fa3c703.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{8146-92e7ccfed169ee9c.js → 8146-27f0e31f309897a5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/1845-5ce774d5ab81ed57.js → frontend_dist/_next/static/chunks/8731-2f78ec7b7760be8f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-727704fc34e74ae0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/976-18c98af60b76f1a7.js → frontend_dist/_next/static/chunks/976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-8254de4f793643d0.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-85cecae037fd7a70.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-286133386c97a2b6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-e561ae38cf5592e8.js → global-hooks-3da370825153056c.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-449a022f2f0f2d94.js → frontend_dist/_next/static/chunks/pages/manage/files-39b73da5a15590f6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-60845f0b59142f32.js → settings-666748ff5d101411.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js → frontend_dist/_next/static/chunks/pages/manage/users/new-1932ce64823b372b.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-f83deb790548693b.js → frontend_dist/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-f0c40645f385f23f.js → frontend_dist/_next/static/chunks/pages/overview-7b2ba2d5405c05fe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-7bca6f718b939934.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-ddddcddd2f74b4f6.js → block-runs-15d307e6ba934a56.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-25dbd73201d99e80.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js → frontend_dist/_next/static/chunks/pages/sign-in-f3a33e8f83abdb58.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-0e0c2713a2922be7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/xxcdnITr3IkTdETH5ghqw/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +5 -5
- mage_ai/server/frontend_dist/files.html +5 -5
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist/global-data-products.html +5 -5
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
- mage_ai/server/frontend_dist/global-hooks.html +5 -5
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +5 -5
- mage_ai/server/frontend_dist/manage/settings.html +5 -5
- mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist/manage/users.html +5 -5
- mage_ai/server/frontend_dist/manage.html +5 -5
- mage_ai/server/frontend_dist/oauth.html +4 -4
- mage_ai/server/frontend_dist/overview.html +5 -5
- mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +5 -5
- mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +24 -24
- mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist/templates.html +5 -5
- mage_ai/server/frontend_dist/terminal.html +5 -5
- mage_ai/server/frontend_dist/test.html +5 -5
- mage_ai/server/frontend_dist/triggers.html +5 -5
- mage_ai/server/frontend_dist/version-control.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-0f9a12782f0aaae6.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-14191a781cf2f286.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-a7a52bcaaa687b07.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-e81a62f33337ca06.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-3cb1f765210dd7a4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4138-2c16e6d2f22246cd.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4366-93e09e5a4a7e182c.js → 4366-3e52497942acbafe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5499-76cf8f023c6b0985.js → 5499-c2853ef57d39fde8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/6285-e9b45335bfb9ccaf.js → frontend_dist_base_path_template/_next/static/chunks/6285-648f9a732e100b2f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6990-303bb87fc50f1755.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/7858-d9df72e95e438284.js → frontend_dist_base_path_template/_next/static/chunks/7858-26a5a5d04fa3c703.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{8146-92e7ccfed169ee9c.js → 8146-27f0e31f309897a5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-9d6a7cea289e29ff.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-608d62c0eef1f29a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/1845-5ce774d5ab81ed57.js → frontend_dist_base_path_template/_next/static/chunks/8731-2f78ec7b7760be8f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-93d18aaecef0685b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-727704fc34e74ae0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-48fba6b4e6966fb7.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/976-18c98af60b76f1a7.js → frontend_dist_base_path_template/_next/static/chunks/976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-8254de4f793643d0.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js → frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-b926f6eb1ee9a53b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-a9402b51e9fe748e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-85cecae037fd7a70.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-cfd68e760ae00958.js → [...slug]-c3c9523ea8072c11.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-c3b79ef31007f95b.js → global-data-products-4d046f15202a1c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-286133386c97a2b6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-e561ae38cf5592e8.js → global-hooks-3da370825153056c.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/files-449a022f2f0f2d94.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-39b73da5a15590f6.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-60845f0b59142f32.js → settings-666748ff5d101411.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-be27631e67dbe070.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-1932ce64823b372b.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users-28a930b148d99766.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-ed509c75cf23f0f5.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-f83deb790548693b.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-1feebec1124123fc.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-8bb62c4f6a511c43.js → oauth-e9b8f19c30381c28.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-f0c40645f385f23f.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-7b2ba2d5405c05fe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-70fc3351bd11025f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-6ee3b88a5bb4ce94.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c9cf383bc13ce7b8.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-7bca6f718b939934.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-c119f630038b0685.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-146051325c92d742.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-ddddcddd2f74b4f6.js → block-runs-15d307e6ba934a56.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f6196e563b960e5c.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-25dbd73201d99e80.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-06e55db757959ef8.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ec3c45cfa027db58.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-495e877aa7ed709e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-49adfeed5157d92b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6143e028225390f5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-0886f6320fef7131.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e82a763d742cc034.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-50d20fa715d454af.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-b78b1be5b9ed84b9.js → [...slug]-2bbd63b7e93a8600.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-37b78a436eeab258.js → permissions-4ea156c39608caab.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-f3c29ec53ee35795.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-db05a80d18c168e5.js → [...slug]-64ec8928d2542f3c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-f55c77e4f46c8d33.js → roles-835e6ec2a48ec583.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-2a1f8737561fdd94.js → sync-data-0769149af025de30.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-e3bf6e5d8bb250c4.js → [...slug]-612a65c42bcadef0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-20f0a050a42a015d.js → users-e3365b4029a8db33.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f3a33e8f83abdb58.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f264097bf8120f31.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-1bfaa1c50e844813.js → templates-406e13cc5c4caab4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{terminal-ed121e305169cf1c.js → terminal-ef8ad878e5e7bb2f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a90728798f964700.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-0e0c2713a2922be7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/gDn6inKdLyj35NvURBSCV/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
- mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +20 -20
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/test.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
- mage_ai/server/server.py +11 -3
- mage_ai/services/k8s/job_manager.py +1 -0
- mage_ai/settings/repo.py +3 -0
- mage_ai/shared/files.py +47 -0
- mage_ai/shared/models.py +1 -0
- mage_ai/streaming/constants.py +1 -0
- mage_ai/streaming/sinks/postgres.py +2 -0
- mage_ai/streaming/sinks/rabbitmq.py +76 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/streaming/sources/nats_js.py +12 -1
- mage_ai/tests/api/operations/test_operations_with_hooks.py +136 -91
- mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
- mage_ai/tests/data_preparation/executors/test_block_executor.py +2 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +33 -8
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +82 -38
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +6 -1
- mage_ai/tests/data_preparation/models/test_block.py +26 -0
- mage_ai/tests/data_preparation/models/test_pipeline.py +15 -0
- mage_ai/tests/factory.py +40 -2
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
- mage_ai/tests/services/k8s/test_job_manager.py +16 -0
- mage_ai/tests/shared/mixins.py +60 -23
- mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/METADATA +7 -4
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/RECORD +335 -321
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/9jB4XPuz6BzxBcG9VNao5/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-ac7722e8b1ab88fe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3419-f8d518d024e7b5c8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/600-705fe234320ec5de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-a1584445357a276c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/90-a7308bae028d7001.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-ac7722e8b1ab88fe.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-f8d518d024e7b5c8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-705fe234320ec5de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-a1584445357a276c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-0d582a6ca33c3dfa.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-a7308bae028d7001.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-334e7db5c84cb4ea.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-419775ca1293b354.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-b35d37bfba8fbccc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-ef680455ae54ccbe.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/uPDjJYpJMst1q6psbRyte/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{9jB4XPuz6BzxBcG9VNao5 → xxcdnITr3IkTdETH5ghqw}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{uPDjJYpJMst1q6psbRyte → gDn6inKdLyj35NvURBSCV}/_ssgManifest.js +0 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.48.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,7 @@ from mage_ai.data_preparation.models.block.data_integration.constants import (
|
|
|
24
24
|
KEY_METADATA,
|
|
25
25
|
KEY_PARTITION_KEYS,
|
|
26
26
|
KEY_PROPERTIES,
|
|
27
|
+
KEY_RECORD,
|
|
27
28
|
KEY_REPLICATION_METHOD,
|
|
28
29
|
KEY_SCHEMA,
|
|
29
30
|
KEY_STREAM,
|
|
@@ -31,10 +32,14 @@ from mage_ai.data_preparation.models.block.data_integration.constants import (
|
|
|
31
32
|
KEY_TYPE,
|
|
32
33
|
KEY_UNIQUE_CONFLICT_METHOD,
|
|
33
34
|
KEY_UNIQUE_CONSTRAINTS,
|
|
35
|
+
KEY_VALUE,
|
|
34
36
|
MAX_QUERY_STRING_SIZE,
|
|
37
|
+
OUTPUT_TYPE_RECORD,
|
|
35
38
|
OUTPUT_TYPE_SCHEMA,
|
|
39
|
+
OUTPUT_TYPE_STATE,
|
|
36
40
|
REPLICATION_METHOD_INCREMENTAL,
|
|
37
41
|
STATE_FILENAME,
|
|
42
|
+
VARIABLE_BOOKMARK_VALUES_KEY,
|
|
38
43
|
IngestMode,
|
|
39
44
|
)
|
|
40
45
|
from mage_ai.data_preparation.models.block.data_integration.data import (
|
|
@@ -48,6 +53,7 @@ from mage_ai.data_preparation.models.constants import (
|
|
|
48
53
|
)
|
|
49
54
|
from mage_ai.data_preparation.models.pipelines.utils import number_string
|
|
50
55
|
from mage_ai.shared.array import find
|
|
56
|
+
from mage_ai.shared.files import reverse_readline
|
|
51
57
|
from mage_ai.shared.hash import dig, extract, merge_dict
|
|
52
58
|
from mage_ai.shared.parsers import encode_complex, extract_json_objects
|
|
53
59
|
from mage_ai.shared.security import filter_out_config_values
|
|
@@ -278,23 +284,82 @@ def get_streams_from_output_directory(
|
|
|
278
284
|
# or
|
|
279
285
|
# ../[block_uuid]/[data_integration_uuid]
|
|
280
286
|
dir_full_path1 = os.path.join(output_directory_path, dir_name1)
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
287
|
+
if os.path.isdir(dir_full_path1):
|
|
288
|
+
for dir_name2 in os.listdir(dir_full_path1):
|
|
289
|
+
if not data_integration_uuid:
|
|
290
|
+
mapping[dir_name2] = []
|
|
291
|
+
# ../[block_uuid]/[data_integration_uuid]/[stream]/00000000000000000000
|
|
292
|
+
# or
|
|
293
|
+
# ../[block_uuid]/[data_integration_uuid]/[stream]
|
|
294
|
+
dir_full_path2 = os.path.join(dir_full_path1, dir_name2)
|
|
295
|
+
if data_integration_uuid:
|
|
296
|
+
mapping[dir_name1].append(dir_full_path2)
|
|
297
|
+
elif os.path.isdir(dir_full_path2):
|
|
298
|
+
for dir_name3 in os.listdir(dir_full_path2):
|
|
299
|
+
dir_full_path3 = os.path.join(dir_full_path2, dir_name3)
|
|
300
|
+
mapping[dir_name2].append(dir_full_path3)
|
|
294
301
|
|
|
295
302
|
return mapping
|
|
296
303
|
|
|
297
304
|
|
|
305
|
+
def get_state_data(
|
|
306
|
+
block,
|
|
307
|
+
catalog: Dict,
|
|
308
|
+
from_notebook: bool = False,
|
|
309
|
+
index: int = None,
|
|
310
|
+
partition: str = None,
|
|
311
|
+
data_integration_uuid: str = None,
|
|
312
|
+
include_record: bool = False,
|
|
313
|
+
stream_id: str = None,
|
|
314
|
+
) -> Union[Dict, Tuple[Dict, Dict]]:
|
|
315
|
+
output_file_paths = get_output_file_paths(
|
|
316
|
+
block,
|
|
317
|
+
catalog,
|
|
318
|
+
from_notebook=from_notebook,
|
|
319
|
+
index=index,
|
|
320
|
+
partition=partition,
|
|
321
|
+
data_integration_uuid=data_integration_uuid,
|
|
322
|
+
stream_id=stream_id,
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
output_file_paths.sort()
|
|
326
|
+
|
|
327
|
+
record = None
|
|
328
|
+
state_data = None
|
|
329
|
+
|
|
330
|
+
if output_file_paths:
|
|
331
|
+
output_file_path = output_file_paths[-1]
|
|
332
|
+
|
|
333
|
+
for line in reverse_readline(output_file_path):
|
|
334
|
+
if line:
|
|
335
|
+
try:
|
|
336
|
+
row = json.loads(line)
|
|
337
|
+
row_type = row.get(KEY_TYPE)
|
|
338
|
+
|
|
339
|
+
if include_record and \
|
|
340
|
+
OUTPUT_TYPE_RECORD == row_type and \
|
|
341
|
+
KEY_RECORD in row and \
|
|
342
|
+
(not stream_id or stream_id == row.get(KEY_STREAM)):
|
|
343
|
+
|
|
344
|
+
record = row[KEY_RECORD]
|
|
345
|
+
elif OUTPUT_TYPE_STATE == row_type and KEY_VALUE in row:
|
|
346
|
+
# If it finds a state again even before it find a record, break.
|
|
347
|
+
if state_data is not None:
|
|
348
|
+
break
|
|
349
|
+
|
|
350
|
+
state_data = row[KEY_VALUE]
|
|
351
|
+
|
|
352
|
+
if not include_record or record:
|
|
353
|
+
break
|
|
354
|
+
except json.JSONDecodeError:
|
|
355
|
+
pass
|
|
356
|
+
|
|
357
|
+
if include_record:
|
|
358
|
+
return state_data, record
|
|
359
|
+
|
|
360
|
+
return state_data
|
|
361
|
+
|
|
362
|
+
|
|
298
363
|
def execute_data_integration(
|
|
299
364
|
block,
|
|
300
365
|
outputs_from_input_vars,
|
|
@@ -303,6 +368,7 @@ def execute_data_integration(
|
|
|
303
368
|
dynamic_block_index: int = None,
|
|
304
369
|
dynamic_upstream_block_uuids: List[str] = None,
|
|
305
370
|
execution_partition: str = None,
|
|
371
|
+
execution_partition_previous: str = None,
|
|
306
372
|
from_notebook: bool = False,
|
|
307
373
|
global_vars: Dict = None,
|
|
308
374
|
input_from_output: Dict = None,
|
|
@@ -382,17 +448,34 @@ def execute_data_integration(
|
|
|
382
448
|
return []
|
|
383
449
|
|
|
384
450
|
# Handle incremental sync
|
|
385
|
-
|
|
451
|
+
state_data = None
|
|
386
452
|
if index is not None:
|
|
387
453
|
batch_fetch_limit = get_batch_fetch_limit(config)
|
|
388
|
-
state_file_path = get_state_file_path(block, data_integration_uuid, stream)
|
|
389
454
|
stream_catalogs = get_streams_from_catalog(catalog, [stream]) or []
|
|
390
455
|
|
|
391
456
|
if len(stream_catalogs) == 1 and \
|
|
392
457
|
REPLICATION_METHOD_INCREMENTAL == stream_catalogs[0].get('replication_method'):
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
458
|
+
|
|
459
|
+
if global_vars_more and VARIABLE_BOOKMARK_VALUES_KEY in global_vars_more:
|
|
460
|
+
bookmark_values_by_block_uuid = global_vars_more.get(
|
|
461
|
+
VARIABLE_BOOKMARK_VALUES_KEY,
|
|
462
|
+
) or {}
|
|
463
|
+
|
|
464
|
+
if bookmark_values_by_block_uuid.get(block.uuid):
|
|
465
|
+
state_data = dict(
|
|
466
|
+
bookmarks=bookmark_values_by_block_uuid.get(block.uuid),
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
if not state_data and execution_partition_previous:
|
|
470
|
+
state_data = get_state_data(
|
|
471
|
+
block,
|
|
472
|
+
catalog,
|
|
473
|
+
data_integration_uuid=data_integration_uuid,
|
|
474
|
+
from_notebook=from_notebook,
|
|
475
|
+
index=index,
|
|
476
|
+
partition=execution_partition_previous,
|
|
477
|
+
stream_id=stream,
|
|
478
|
+
)
|
|
396
479
|
else:
|
|
397
480
|
query_data['_offset'] = batch_fetch_limit * index
|
|
398
481
|
|
|
@@ -436,10 +519,14 @@ def execute_data_integration(
|
|
|
436
519
|
block.get_catalog_file_path(),
|
|
437
520
|
]
|
|
438
521
|
|
|
439
|
-
if
|
|
522
|
+
if state_data:
|
|
440
523
|
args += [
|
|
441
|
-
'--
|
|
442
|
-
|
|
524
|
+
'--state_json',
|
|
525
|
+
simplejson.dumps(
|
|
526
|
+
state_data,
|
|
527
|
+
default=encode_complex,
|
|
528
|
+
ignore_nan=True,
|
|
529
|
+
),
|
|
443
530
|
]
|
|
444
531
|
|
|
445
532
|
if len(selected_streams) >= 1:
|
|
@@ -575,11 +662,11 @@ def convert_block_output_data_for_destination(
|
|
|
575
662
|
input_vars_fetched, _kwargs_vars, upstream_block_uuids = \
|
|
576
663
|
block.fetch_input_variables(
|
|
577
664
|
None,
|
|
578
|
-
partition,
|
|
579
|
-
global_vars,
|
|
580
665
|
dynamic_block_index=dynamic_block_index,
|
|
581
666
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
667
|
+
execution_partition=partition,
|
|
582
668
|
from_notebook=from_notebook,
|
|
669
|
+
global_vars=global_vars,
|
|
583
670
|
upstream_block_uuids=[stream],
|
|
584
671
|
)
|
|
585
672
|
|
|
@@ -953,7 +1040,7 @@ def __execute_destination(
|
|
|
953
1040
|
return proc
|
|
954
1041
|
|
|
955
1042
|
|
|
956
|
-
def
|
|
1043
|
+
def get_output_file_paths(
|
|
957
1044
|
block,
|
|
958
1045
|
catalog: Dict,
|
|
959
1046
|
from_notebook: bool = False,
|
|
@@ -961,8 +1048,7 @@ def convert_outputs_to_data(
|
|
|
961
1048
|
partition: str = None,
|
|
962
1049
|
data_integration_uuid: str = None,
|
|
963
1050
|
stream_id: str = None,
|
|
964
|
-
|
|
965
|
-
) -> Dict:
|
|
1051
|
+
) -> List[str]:
|
|
966
1052
|
variable = build_variable(
|
|
967
1053
|
block,
|
|
968
1054
|
data_integration_uuid=data_integration_uuid,
|
|
@@ -987,6 +1073,29 @@ def convert_outputs_to_data(
|
|
|
987
1073
|
output_file_paths.append(output_file_path)
|
|
988
1074
|
output_file_paths.sort()
|
|
989
1075
|
|
|
1076
|
+
return output_file_paths
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
def convert_outputs_to_data(
|
|
1080
|
+
block,
|
|
1081
|
+
catalog: Dict,
|
|
1082
|
+
from_notebook: bool = False,
|
|
1083
|
+
index: int = None,
|
|
1084
|
+
partition: str = None,
|
|
1085
|
+
data_integration_uuid: str = None,
|
|
1086
|
+
stream_id: str = None,
|
|
1087
|
+
sample_count: int = None,
|
|
1088
|
+
) -> Dict:
|
|
1089
|
+
output_file_paths = get_output_file_paths(
|
|
1090
|
+
block,
|
|
1091
|
+
catalog,
|
|
1092
|
+
from_notebook=from_notebook,
|
|
1093
|
+
index=index,
|
|
1094
|
+
partition=partition,
|
|
1095
|
+
data_integration_uuid=data_integration_uuid,
|
|
1096
|
+
stream_id=stream_id,
|
|
1097
|
+
)
|
|
1098
|
+
|
|
990
1099
|
columns_to_select = []
|
|
991
1100
|
rows = []
|
|
992
1101
|
stream_settings = {}
|
|
@@ -1011,19 +1120,20 @@ def convert_outputs_to_data(
|
|
|
1011
1120
|
columns_to_select = [d.get('column') for d in columns]
|
|
1012
1121
|
|
|
1013
1122
|
for output_file_path in output_file_paths:
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1123
|
+
if os.path.exists(output_file_path):
|
|
1124
|
+
with open(output_file_path) as f:
|
|
1125
|
+
for line in f:
|
|
1126
|
+
try:
|
|
1127
|
+
if sample_count is not None and row_count >= sample_count:
|
|
1128
|
+
break
|
|
1129
|
+
|
|
1130
|
+
row = json.loads(line)
|
|
1131
|
+
record = row.get('record')
|
|
1132
|
+
if record and stream_id == row.get('stream'):
|
|
1133
|
+
rows.append([record.get(col) for col in columns_to_select])
|
|
1134
|
+
row_count += 1
|
|
1135
|
+
except json.JSONDecodeError:
|
|
1136
|
+
pass
|
|
1027
1137
|
|
|
1028
1138
|
if sample_count is not None:
|
|
1029
1139
|
rows = rows[:sample_count]
|
|
@@ -1113,8 +1223,12 @@ def count_records(
|
|
|
1113
1223
|
config: Dict,
|
|
1114
1224
|
source_uuid: str,
|
|
1115
1225
|
streams: List[str],
|
|
1226
|
+
block=None,
|
|
1116
1227
|
catalog: Dict = None,
|
|
1117
1228
|
catalog_file_path: str = None,
|
|
1229
|
+
from_notebook: bool = False,
|
|
1230
|
+
partition: str = None,
|
|
1231
|
+
variables: Dict = None,
|
|
1118
1232
|
) -> List[Dict]:
|
|
1119
1233
|
arr = []
|
|
1120
1234
|
|
|
@@ -1152,6 +1266,51 @@ def count_records(
|
|
|
1152
1266
|
catalog_file_path,
|
|
1153
1267
|
]
|
|
1154
1268
|
|
|
1269
|
+
state_data = None
|
|
1270
|
+
# Make sure replication method is INCREMENTAL
|
|
1271
|
+
if block:
|
|
1272
|
+
stream_dicts = catalog.get('streams')
|
|
1273
|
+
if stream_dicts:
|
|
1274
|
+
stream_dict = find(lambda x, stream=stream: x['stream'] == stream, stream_dicts)
|
|
1275
|
+
if not stream_dict:
|
|
1276
|
+
raise Exception(
|
|
1277
|
+
f'No stream settings found for stream {stream} in source {source_uuid}, '
|
|
1278
|
+
'this is unexpected.',
|
|
1279
|
+
)
|
|
1280
|
+
|
|
1281
|
+
if stream_dict and \
|
|
1282
|
+
REPLICATION_METHOD_INCREMENTAL == stream_dict.get(KEY_REPLICATION_METHOD):
|
|
1283
|
+
|
|
1284
|
+
if variables and VARIABLE_BOOKMARK_VALUES_KEY in variables:
|
|
1285
|
+
bookmark_values_by_block_uuid = variables.get(
|
|
1286
|
+
VARIABLE_BOOKMARK_VALUES_KEY,
|
|
1287
|
+
) or {}
|
|
1288
|
+
|
|
1289
|
+
if bookmark_values_by_block_uuid.get(block.uuid):
|
|
1290
|
+
state_data = dict(
|
|
1291
|
+
bookmarks=bookmark_values_by_block_uuid.get(block.uuid),
|
|
1292
|
+
)
|
|
1293
|
+
|
|
1294
|
+
if not state_data:
|
|
1295
|
+
state_data = get_state_data(
|
|
1296
|
+
block,
|
|
1297
|
+
catalog,
|
|
1298
|
+
data_integration_uuid=source_uuid,
|
|
1299
|
+
from_notebook=from_notebook,
|
|
1300
|
+
partition=partition,
|
|
1301
|
+
stream_id=stream,
|
|
1302
|
+
)
|
|
1303
|
+
|
|
1304
|
+
if state_data:
|
|
1305
|
+
args += [
|
|
1306
|
+
'--state_json',
|
|
1307
|
+
simplejson.dumps(
|
|
1308
|
+
state_data,
|
|
1309
|
+
default=encode_complex,
|
|
1310
|
+
ignore_nan=True,
|
|
1311
|
+
),
|
|
1312
|
+
]
|
|
1313
|
+
|
|
1155
1314
|
arr += json.loads(__run_in_subprocess(args, config=config))
|
|
1156
1315
|
|
|
1157
1316
|
return arr
|
|
@@ -29,8 +29,8 @@ def create_upstream_block_tables(
|
|
|
29
29
|
|
|
30
30
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
31
31
|
None,
|
|
32
|
-
execution_partition,
|
|
33
|
-
None,
|
|
32
|
+
execution_partition=execution_partition,
|
|
33
|
+
global_vars=None,
|
|
34
34
|
dynamic_block_index=dynamic_block_index,
|
|
35
35
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
36
36
|
)
|
|
@@ -35,8 +35,8 @@ def create_upstream_block_tables(
|
|
|
35
35
|
|
|
36
36
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
37
37
|
None,
|
|
38
|
-
execution_partition,
|
|
39
|
-
None,
|
|
38
|
+
execution_partition=execution_partition,
|
|
39
|
+
global_vars=None,
|
|
40
40
|
dynamic_block_index=dynamic_block_index,
|
|
41
41
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
42
42
|
)
|
|
@@ -32,8 +32,8 @@ def create_upstream_block_tables(
|
|
|
32
32
|
|
|
33
33
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
34
34
|
None,
|
|
35
|
-
execution_partition,
|
|
36
|
-
None,
|
|
35
|
+
execution_partition=execution_partition,
|
|
36
|
+
global_vars=None,
|
|
37
37
|
dynamic_block_index=dynamic_block_index,
|
|
38
38
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
39
39
|
)
|
|
@@ -10,9 +10,12 @@ from mage_ai.data_preparation.models.block.sql.constants import (
|
|
|
10
10
|
CONFIG_KEY_UPSTREAM_BLOCK_CONFIGURATION_TABLE_NAME,
|
|
11
11
|
)
|
|
12
12
|
from mage_ai.data_preparation.models.constants import BlockLanguage, BlockType
|
|
13
|
+
from mage_ai.data_preparation.shared.utils import get_template_vars
|
|
14
|
+
from mage_ai.data_preparation.templates.utils import get_variable_for_template
|
|
13
15
|
from mage_ai.data_preparation.variable_manager import get_variable
|
|
14
16
|
from mage_ai.io.config import ConfigFileLoader
|
|
15
17
|
from mage_ai.settings.repo import get_repo_path
|
|
18
|
+
from mage_ai.shared.hash import merge_dict
|
|
16
19
|
|
|
17
20
|
MAGE_SEMI_COLON = '__MAGE_SEMI_COLON__'
|
|
18
21
|
|
|
@@ -228,7 +231,21 @@ def interpolate_input(
|
|
|
228
231
|
def interpolate_vars(query, global_vars=None):
|
|
229
232
|
if global_vars is None:
|
|
230
233
|
global_vars = dict()
|
|
231
|
-
|
|
234
|
+
|
|
235
|
+
return Template(
|
|
236
|
+
query,
|
|
237
|
+
undefined=StrictUndefined,
|
|
238
|
+
).render(
|
|
239
|
+
variables=lambda x, p=None, v=global_vars: get_variable_for_template(
|
|
240
|
+
x,
|
|
241
|
+
parse=p,
|
|
242
|
+
variables=v,
|
|
243
|
+
),
|
|
244
|
+
**merge_dict(
|
|
245
|
+
global_vars,
|
|
246
|
+
get_template_vars(),
|
|
247
|
+
),
|
|
248
|
+
)
|
|
232
249
|
|
|
233
250
|
|
|
234
251
|
def table_name_parts(
|
|
@@ -353,8 +370,8 @@ def create_upstream_block_tables(
|
|
|
353
370
|
|
|
354
371
|
input_vars, kwargs_vars, upstream_block_uuids = block.fetch_input_variables(
|
|
355
372
|
None,
|
|
356
|
-
execution_partition,
|
|
357
|
-
None,
|
|
373
|
+
execution_partition=execution_partition,
|
|
374
|
+
global_vars=None,
|
|
358
375
|
dynamic_block_index=dynamic_block_index,
|
|
359
376
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
360
377
|
)
|
|
@@ -16,6 +16,7 @@ from mage_ai.data_preparation.models.block.dynamic import (
|
|
|
16
16
|
from mage_ai.data_preparation.models.constants import (
|
|
17
17
|
DATAFRAME_ANALYSIS_MAX_COLUMNS,
|
|
18
18
|
BlockType,
|
|
19
|
+
PipelineType,
|
|
19
20
|
)
|
|
20
21
|
from mage_ai.server.kernel_output_parser import DataType
|
|
21
22
|
from mage_ai.shared.array import find, unique_by
|
|
@@ -200,6 +201,14 @@ def create_block_runs_from_dynamic_block(
|
|
|
200
201
|
else:
|
|
201
202
|
arr.append(upstream_block.uuid)
|
|
202
203
|
|
|
204
|
+
if metadata.get('upstream_blocks'):
|
|
205
|
+
for up_uuid in (metadata.get('upstream_blocks') or []):
|
|
206
|
+
up_block = block.pipeline.get_block(up_uuid)
|
|
207
|
+
if up_block:
|
|
208
|
+
arr.append(up_uuid)
|
|
209
|
+
else:
|
|
210
|
+
arr.append(f'{downstream_block.uuid}:{up_uuid}')
|
|
211
|
+
|
|
203
212
|
block_run = create_block_run_from_dynamic_child(
|
|
204
213
|
downstream_block,
|
|
205
214
|
pipeline_run,
|
|
@@ -513,22 +522,28 @@ def output_variables(
|
|
|
513
522
|
partition=execution_partition,
|
|
514
523
|
)
|
|
515
524
|
|
|
525
|
+
if should_reduce_output(block):
|
|
526
|
+
all_variables = all_variable_uuids(
|
|
527
|
+
block,
|
|
528
|
+
partition=execution_partition,
|
|
529
|
+
)
|
|
530
|
+
else:
|
|
531
|
+
all_variables = block.get_variables_by_block(
|
|
532
|
+
block_uuid=block_uuid,
|
|
533
|
+
partition=execution_partition,
|
|
534
|
+
)
|
|
535
|
+
output_variables = [v for v in all_variables
|
|
536
|
+
if is_output_variable(v, include_df=include_df)]
|
|
537
|
+
|
|
516
538
|
if block and di_settings:
|
|
517
539
|
streams = get_selected_streams(di_settings.get('catalog'))
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
partition=execution_partition,
|
|
524
|
-
)
|
|
540
|
+
tap_stream_ids = [s.get('tap_stream_id') for s in streams]
|
|
541
|
+
# For integration pipelines, we want to include variables with the "output" prefix
|
|
542
|
+
# to view sample data for the selected streams.
|
|
543
|
+
if pipeline.type == PipelineType.INTEGRATION:
|
|
544
|
+
output_variables.extend(tap_stream_ids)
|
|
525
545
|
else:
|
|
526
|
-
|
|
527
|
-
block_uuid=block_uuid,
|
|
528
|
-
partition=execution_partition,
|
|
529
|
-
)
|
|
530
|
-
output_variables = [v for v in all_variables
|
|
531
|
-
if is_output_variable(v, include_df=include_df)]
|
|
546
|
+
output_variables = tap_stream_ids
|
|
532
547
|
|
|
533
548
|
output_variables.sort()
|
|
534
549
|
|
|
@@ -632,12 +647,13 @@ def fetch_input_variables(
|
|
|
632
647
|
pipeline,
|
|
633
648
|
upstream_block_uuids: List[str],
|
|
634
649
|
input_args: List[Any],
|
|
635
|
-
|
|
636
|
-
|
|
650
|
+
block_run_outputs_cache: Dict[str, List] = None,
|
|
651
|
+
data_integration_settings_mapping: Dict = None,
|
|
637
652
|
dynamic_block_index: int = None,
|
|
638
653
|
dynamic_upstream_block_uuids: List[str] = None,
|
|
654
|
+
execution_partition: str = None,
|
|
639
655
|
from_notebook: bool = False,
|
|
640
|
-
|
|
656
|
+
global_vars: Dict = None,
|
|
641
657
|
) -> Tuple[List, List, List]:
|
|
642
658
|
"""
|
|
643
659
|
Fetches the input variables for a block.
|
|
@@ -668,6 +684,7 @@ def fetch_input_variables(
|
|
|
668
684
|
upstream_block_uuids_final = upstream_block_uuids
|
|
669
685
|
elif pipeline is not None:
|
|
670
686
|
input_vars = [None for i in range(len(upstream_block_uuids))]
|
|
687
|
+
# A mapping from upstream block UUID to a list of variable names
|
|
671
688
|
input_variables_by_uuid = input_variables(
|
|
672
689
|
pipeline,
|
|
673
690
|
upstream_block_uuids,
|
|
@@ -680,6 +697,7 @@ def fetch_input_variables(
|
|
|
680
697
|
input_args=input_args,
|
|
681
698
|
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
682
699
|
)
|
|
700
|
+
# Block UUIDs
|
|
683
701
|
keys = input_variables_by_uuid.keys()
|
|
684
702
|
reduce_output_indexes = []
|
|
685
703
|
|
|
@@ -693,8 +711,10 @@ def fetch_input_variables(
|
|
|
693
711
|
input_vars[idx] = global_data_product.get_outputs()
|
|
694
712
|
continue
|
|
695
713
|
|
|
714
|
+
# Block output variables for upstream_block_uuid
|
|
696
715
|
variables = input_variables_by_uuid[upstream_block_uuid]
|
|
697
716
|
|
|
717
|
+
# Fetch variable values
|
|
698
718
|
if should_reduce:
|
|
699
719
|
variable_values = [reduce_output_from_block(
|
|
700
720
|
upstream_block,
|
|
@@ -707,19 +727,23 @@ def fetch_input_variables(
|
|
|
707
727
|
spark=spark,
|
|
708
728
|
) for variable_uuid in variables]
|
|
709
729
|
else:
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
730
|
+
# Getting input variables from cache the cache is not empty
|
|
731
|
+
if block_run_outputs_cache:
|
|
732
|
+
variable_values = block_run_outputs_cache.get(upstream_block_uuid, [])
|
|
733
|
+
else:
|
|
734
|
+
variable_values = [
|
|
735
|
+
pipeline.get_block_variable(
|
|
736
|
+
upstream_block_uuid,
|
|
737
|
+
var,
|
|
738
|
+
from_notebook=from_notebook,
|
|
739
|
+
global_vars=global_vars,
|
|
740
|
+
input_args=input_args,
|
|
741
|
+
partition=execution_partition,
|
|
742
|
+
raise_exception=True,
|
|
743
|
+
spark=spark,
|
|
744
|
+
)
|
|
745
|
+
for var in variables
|
|
746
|
+
]
|
|
723
747
|
|
|
724
748
|
upstream_in_dynamic_upstream = False
|
|
725
749
|
if dynamic_upstream_block_uuids:
|
|
@@ -39,6 +39,55 @@ class HookOutputKey(str, Enum):
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
VALID_KEYS_FOR_INPUT_OUTPUT_DATA_RESTRICTED = [key.value for key in HookOutputKey]
|
|
42
|
-
VALID_KEYS_FOR_INPUT_OUTPUT_DATA_UNRESTRICTED = [
|
|
42
|
+
VALID_KEYS_FOR_INPUT_OUTPUT_DATA_UNRESTRICTED = [
|
|
43
|
+
'hook',
|
|
44
|
+
'resource_id',
|
|
45
|
+
'resource_parent_id',
|
|
46
|
+
'user',
|
|
47
|
+
]
|
|
43
48
|
VALID_KEYS_FOR_INPUT_OUTPUT_DATA_ALL = \
|
|
44
49
|
VALID_KEYS_FOR_INPUT_OUTPUT_DATA_RESTRICTED + VALID_KEYS_FOR_INPUT_OUTPUT_DATA_UNRESTRICTED
|
|
50
|
+
|
|
51
|
+
INTERNAL_DEFAULT_PREDICATE_VALUE = '__INTERNAL_DEFAULT_PREDICATE_VALUE__'
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class PredicateAndOrOperator(str, Enum):
|
|
55
|
+
AND = 'and'
|
|
56
|
+
OR = 'or'
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PredicateObjectType(str, Enum):
|
|
60
|
+
ERROR = HookOutputKey.ERROR.value
|
|
61
|
+
HOOK = 'hook'
|
|
62
|
+
META = HookOutputKey.META.value
|
|
63
|
+
METADATA = HookOutputKey.METADATA.value
|
|
64
|
+
OPERATION_RESOURCE = 'operation_resource'
|
|
65
|
+
PAYLOAD = HookOutputKey.PAYLOAD.value
|
|
66
|
+
QUERY = HookOutputKey.QUERY.value
|
|
67
|
+
RESOURCE = HookOutputKey.RESOURCE.value
|
|
68
|
+
RESOURCES = HookOutputKey.RESOURCES.value
|
|
69
|
+
RESOURCE_ID = 'resource_id'
|
|
70
|
+
RESOURCE_PARENT_ID = 'resource_parent_id'
|
|
71
|
+
USER = 'user'
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class PredicateOperator(str, Enum):
|
|
75
|
+
EQUALS = 'EQUALS'
|
|
76
|
+
GREATER_THAN = 'GREATER_THAN'
|
|
77
|
+
GREATER_THAN_OR_EQUALS = 'GREATER_THAN_OR_EQUALS'
|
|
78
|
+
INCLUDES = 'INCLUDES'
|
|
79
|
+
LESS_THAN = 'LESS_THAN'
|
|
80
|
+
LESS_THAN_OR_EQUALS = 'LESS_THAN_OR_EQUALS'
|
|
81
|
+
NOT_EQUALS = 'NOT_EQUALS'
|
|
82
|
+
NOT_INCLUDES = 'NOT_INCLUDES'
|
|
83
|
+
NOT_PRESENT = 'NOT_PRESENT'
|
|
84
|
+
PRESENT = 'PRESENT'
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class PredicateValueDataType(str, Enum):
|
|
88
|
+
BOOLEAN = 'BOOLEAN'
|
|
89
|
+
DICTIONARY = 'DICTIONARY'
|
|
90
|
+
FLOAT = 'FLOAT'
|
|
91
|
+
INTEGER = 'INTEGER'
|
|
92
|
+
LIST = 'LIST'
|
|
93
|
+
STRING = 'STRING'
|