mage-ai 0.9.45__py3-none-any.whl → 0.9.47__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.
- mage_ai/api/constants.py +2 -0
- mage_ai/api/operations/base.py +230 -12
- mage_ai/api/policies/BasePolicy.py +3 -3
- mage_ai/api/policies/ComputeClusterPolicy.py +96 -0
- mage_ai/api/policies/ComputeConnectionPolicy.py +74 -0
- mage_ai/api/policies/ComputeServicePolicy.py +50 -0
- mage_ai/api/policies/DownloadPolicy.py +29 -0
- mage_ai/api/policies/GlobalHookPolicy.py +126 -0
- mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
- mage_ai/api/policies/OauthPolicy.py +56 -4
- mage_ai/api/policies/ProjectPolicy.py +1 -0
- mage_ai/api/presenters/ComputeClusterPresenter.py +19 -0
- mage_ai/api/presenters/ComputeConnectionPresenter.py +26 -0
- mage_ai/api/presenters/ComputeServicePresenter.py +15 -0
- mage_ai/api/presenters/DownloadPresenter.py +13 -0
- mage_ai/api/presenters/GlobalHookPresenter.py +74 -0
- 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/presenters/ProjectPresenter.py +1 -0
- mage_ai/api/presenters/SparkApplicationPresenter.py +2 -0
- mage_ai/api/presenters/WorkspacePresenter.py +22 -22
- mage_ai/api/resources/AsyncBaseResource.py +39 -0
- mage_ai/api/resources/BlockResource.py +5 -0
- mage_ai/api/resources/ClusterResource.py +1 -1
- mage_ai/api/resources/ComputeClusterResource.py +109 -0
- mage_ai/api/resources/ComputeConnectionResource.py +103 -0
- mage_ai/api/resources/ComputeServiceResource.py +35 -0
- mage_ai/api/resources/DataProviderResource.py +2 -0
- mage_ai/api/resources/DownloadResource.py +56 -0
- mage_ai/api/resources/ExecutionStateResource.py +1 -1
- mage_ai/api/resources/GlobalHookResource.py +192 -0
- mage_ai/api/resources/IntegrationSourceResource.py +149 -2
- mage_ai/api/resources/KernelResource.py +10 -0
- mage_ai/api/resources/OauthResource.py +28 -33
- mage_ai/api/resources/PipelineResource.py +4 -4
- mage_ai/api/resources/PipelineScheduleResource.py +37 -16
- mage_ai/api/resources/ProjectResource.py +5 -3
- mage_ai/api/resources/SessionResource.py +0 -9
- mage_ai/api/resources/SparkApplicationResource.py +5 -5
- mage_ai/api/resources/SparkEnvironmentResource.py +1 -2
- mage_ai/api/resources/SparkExecutorResource.py +1 -2
- mage_ai/api/resources/SparkJobResource.py +3 -6
- mage_ai/api/resources/SparkSqlResource.py +6 -11
- mage_ai/api/resources/SparkStageAttemptResource.py +2 -3
- mage_ai/api/resources/SparkStageAttemptTaskResource.py +1 -2
- mage_ai/api/resources/SparkStageAttemptTaskSummaryResource.py +1 -2
- mage_ai/api/resources/SparkStageResource.py +3 -6
- mage_ai/api/resources/SparkThreadResource.py +1 -2
- mage_ai/api/resources/mixins/spark.py +25 -4
- mage_ai/authentication/oauth2.py +1 -3
- mage_ai/authentication/permissions/constants.py +4 -0
- mage_ai/authentication/providers/active_directory.py +136 -0
- mage_ai/authentication/providers/constants.py +3 -0
- mage_ai/authentication/providers/ghe.py +24 -25
- mage_ai/authentication/providers/google.py +25 -26
- mage_ai/authentication/providers/oauth.py +2 -2
- mage_ai/authentication/providers/okta.py +28 -29
- mage_ai/authentication/providers/sso.py +2 -2
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +2 -1
- mage_ai/cluster_manager/workspace/base.py +7 -3
- mage_ai/data_integrations/destinations/constants.py +1 -0
- 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 +9 -1
- mage_ai/data_preparation/executors/pipeline_executor.py +9 -0
- mage_ai/data_preparation/models/block/__init__.py +82 -17
- mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
- mage_ai/data_preparation/models/block/data_integration/data.py +1 -1
- mage_ai/data_preparation/models/block/data_integration/utils.py +196 -37
- mage_ai/data_preparation/models/block/spark/mixins.py +82 -34
- mage_ai/data_preparation/models/block/sql/utils/shared.py +18 -1
- mage_ai/data_preparation/models/block/utils.py +28 -13
- mage_ai/data_preparation/models/download/__init__.py +8 -0
- mage_ai/data_preparation/models/global_hooks/__init__.py +0 -0
- mage_ai/data_preparation/models/global_hooks/constants.py +93 -0
- mage_ai/data_preparation/models/global_hooks/models.py +992 -0
- mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
- mage_ai/data_preparation/models/global_hooks/utils.py +21 -0
- mage_ai/data_preparation/models/pipeline.py +84 -6
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
- mage_ai/data_preparation/models/pipelines/models.py +16 -0
- mage_ai/data_preparation/models/project/__init__.py +6 -0
- mage_ai/data_preparation/models/project/constants.py +1 -0
- mage_ai/data_preparation/models/project/models.py +12 -0
- mage_ai/data_preparation/preferences.py +29 -18
- mage_ai/data_preparation/repo_manager.py +35 -3
- 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/data_loaders/streaming/activemq.yaml +6 -0
- mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +20 -0
- mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/chroma.py +153 -0
- mage_ai/io/config.py +8 -0
- mage_ai/orchestration/db/models/schedules.py +100 -36
- mage_ai/orchestration/pipeline_scheduler.py +58 -19
- mage_ai/orchestration/queue/process_queue.py +9 -1
- mage_ai/orchestration/triggers/api.py +11 -3
- mage_ai/orchestration/triggers/constants.py +1 -0
- mage_ai/server/active_kernel.py +37 -4
- mage_ai/server/api/downloads.py +76 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1749-bf512b4dabbab7fa.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7519-8c29bbb92e03cc77.js → 1845-5ce774d5ab81ed57.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-57858e7445d24413.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-92cdffd87b6f6e05.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3932-0ceca9599d6e6d00.js → frontend_dist/_next/static/chunks/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/5457-949640f4037bf12f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5499-76cf8f023c6b0985.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/553-7f7919e14392ca67.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5638-a65610405a70961c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5820-28adeabb5cda2b96.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/600-705fe234320ec5de.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3122-f27de34d0b5426af.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_base_path_template/_next/static/chunks/5397-b5f2e477acc6bd6b.js → frontend_dist/_next/static/chunks/6965-c613d1834c8ed92d.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-18fde36eb46e1d65.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7361-694e1e4fb9c97d68.js → frontend_dist/_next/static/chunks/7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7858-c83d25349d0e980f.js → frontend_dist/_next/static/chunks/7858-d9df72e95e438284.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-0d582a6ca33c3dfa.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3684-cbda680fd8927d07.js → frontend_dist/_next/static/chunks/8432-f191e39f9b5893f2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/90-a7308bae028d7001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/framework-22b71764bf44ede4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-419775ca1293b354.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-3f6fc312f67ff72e.js → [...slug]-cfd68e760ae00958.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-f4cd03036c3e8723.js → global-data-products-c3b79ef31007f95b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-fe6e73463a20d67c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-1d9b298fdceabbf1.js → frontend_dist/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-a7c970122a10afdc.js → users-28a930b148d99766.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-a4647a274cf4dffa.js → frontend_dist/_next/static/chunks/pages/overview-f0c40645f385f23f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-c79819d6826e5416.js → pipeline-runs-b35d37bfba8fbccc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-a52d2d3e0c2978f4.js → logs-ef680455ae54ccbe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ce717786f31e8f04.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/{[pipeline]-35fe7762cb83a733.js → [pipeline]-02c843b9c8418bb5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-d6a62284c7c99cb3.js → [...slug]-b78b1be5b9ed84b9.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-b1389695f758c32b.js → permissions-37b78a436eeab258.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-0bdb66265286ab22.js → [...slug]-db05a80d18c168e5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-e04e18fc295ca76a.js → roles-f55c77e4f46c8d33.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-2a1f8737561fdd94.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-0267358c91122109.js → [...slug]-e3bf6e5d8bb250c4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-50fed18bb9b8d142.js → users-20f0a050a42a015d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{settings-56f83205752b1323.js → settings-0f0121db7f5ff93d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-9370551ffa462144.js → frontend_dist/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-3cff90df13a1a755.js → templates-1bfaa1c50e844813.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-ed121e305169cf1c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-9ae68758102cc843.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-8af2b89c5a3779fc.js → webpack-fea697dd168c6d0c.js} +1 -1
- 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 +24 -0
- mage_ai/server/frontend_dist/global-hooks.html +24 -0
- 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 -25
- 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 +15 -15
- 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/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1749-bf512b4dabbab7fa.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7519-8c29bbb92e03cc77.js → 1845-5ce774d5ab81ed57.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-57858e7445d24413.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-92cdffd87b6f6e05.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3932-0ceca9599d6e6d00.js → frontend_dist_base_path_template/_next/static/chunks/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/5457-949640f4037bf12f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5499-76cf8f023c6b0985.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/553-7f7919e14392ca67.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5638-a65610405a70961c.js +1 -0
- 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/5820-28adeabb5cda2b96.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_base_path_template/_next/static/chunks/600-705fe234320ec5de.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3122-f27de34d0b5426af.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/_next/static/chunks/5397-b5f2e477acc6bd6b.js → frontend_dist_base_path_template/_next/static/chunks/6965-c613d1834c8ed92d.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/7022-18fde36eb46e1d65.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/722-900f786d24f91b2e.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/7361-694e1e4fb9c97d68.js → frontend_dist_base_path_template/_next/static/chunks/7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/7858-c83d25349d0e980f.js → frontend_dist_base_path_template/_next/static/chunks/7858-d9df72e95e438284.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-0d582a6ca33c3dfa.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3684-cbda680fd8927d07.js → frontend_dist_base_path_template/_next/static/chunks/8432-f191e39f9b5893f2.js} +1 -1
- 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-8e1c09546dff4dbf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/90-a7308bae028d7001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-cc44b07f248707b0.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/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/framework-22b71764bf44ede4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-a24cb24b6f08bbc9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-419775ca1293b354.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-3f6fc312f67ff72e.js → [...slug]-cfd68e760ae00958.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-f4cd03036c3e8723.js → global-data-products-c3b79ef31007f95b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-fe6e73463a20d67c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-60845f0b59142f32.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/[user]-1d9b298fdceabbf1.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-9384c5f1efa2ac18.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-abd8571907664fdf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-a7c970122a10afdc.js → users-28a930b148d99766.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-d8a38b5d1f50e798.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-a4647a274cf4dffa.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-f0c40645f385f23f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-c79819d6826e5416.js → pipeline-runs-b35d37bfba8fbccc.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-571c0962333b92f0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{logs-a52d2d3e0c2978f4.js → logs-ef680455ae54ccbe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-ddddcddd2f74b4f6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-4a238307feddb522.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ce717786f31e8f04.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d20b2cd08907afd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-b75bf17498e87354.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/{[pipeline]-35fe7762cb83a733.js → [pipeline]-02c843b9c8418bb5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-d6a62284c7c99cb3.js → [...slug]-b78b1be5b9ed84b9.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-b1389695f758c32b.js → permissions-37b78a436eeab258.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-0bdb66265286ab22.js → [...slug]-db05a80d18c168e5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-e04e18fc295ca76a.js → roles-f55c77e4f46c8d33.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-2a1f8737561fdd94.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-0267358c91122109.js → [...slug]-e3bf6e5d8bb250c4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-50fed18bb9b8d142.js → users-20f0a050a42a015d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{settings-56f83205752b1323.js → settings-0f0121db7f5ff93d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-99e2748e3c1d57a3.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates/[...slug]-9370551ffa462144.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-f44ccd1499ffd23a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-3cff90df13a1a755.js → templates-1bfaa1c50e844813.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-ed121e305169cf1c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-9ae68758102cc843.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-074f3eb2281fba79.js → webpack-d30cb09c85b4c4f0.js} +1 -1
- 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 +24 -0
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +24 -0
- 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 +28 -29
- 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 +15 -15
- 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 +44 -12
- mage_ai/server/utils/output_display.py +6 -0
- mage_ai/server/websocket_server.py +14 -0
- mage_ai/services/aws/emr/config.py +1 -0
- mage_ai/services/aws/emr/constants.py +1 -0
- mage_ai/services/aws/emr/emr.py +20 -7
- mage_ai/services/compute/__init__.py +0 -0
- mage_ai/services/compute/aws/__init__.py +0 -0
- mage_ai/services/compute/aws/constants.py +21 -0
- mage_ai/services/compute/aws/models.py +459 -0
- mage_ai/services/compute/aws/steps.py +482 -0
- mage_ai/services/compute/constants.py +27 -0
- mage_ai/services/compute/models.py +212 -0
- mage_ai/services/k8s/job_manager.py +4 -0
- mage_ai/services/spark/api/aws_emr.py +38 -0
- mage_ai/services/spark/api/base.py +7 -4
- mage_ai/services/spark/api/constants.py +4 -0
- mage_ai/services/spark/api/local.py +25 -24
- mage_ai/services/spark/api/service.py +15 -5
- mage_ai/services/spark/constants.py +1 -1
- mage_ai/services/spark/models/applications.py +45 -3
- mage_ai/services/spark/models/base.py +3 -19
- mage_ai/services/spark/models/environments.py +16 -11
- mage_ai/services/spark/models/executors.py +2 -2
- mage_ai/services/spark/models/sqls.py +46 -15
- mage_ai/services/spark/models/stages.py +55 -32
- mage_ai/services/spark/models/threads.py +2 -2
- mage_ai/services/spark/utils.py +22 -6
- mage_ai/services/ssh/__init__.py +0 -0
- mage_ai/services/ssh/aws/__init__.py +0 -0
- mage_ai/services/ssh/aws/emr/__init__.py +0 -0
- mage_ai/services/ssh/aws/emr/constants.py +10 -0
- mage_ai/services/ssh/aws/emr/models.py +326 -0
- mage_ai/services/ssh/aws/emr/utils.py +151 -0
- mage_ai/settings/__init__.py +8 -1
- mage_ai/settings/repo.py +3 -0
- mage_ai/settings/secret_generation.py +7 -0
- mage_ai/settings/sso.py +8 -0
- mage_ai/shared/files.py +47 -0
- mage_ai/shared/hash.py +16 -0
- mage_ai/shared/models.py +254 -0
- mage_ai/streaming/constants.py +3 -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/activemq.py +89 -0
- mage_ai/streaming/sources/nats_js.py +182 -0
- mage_ai/streaming/sources/source_factory.py +8 -0
- mage_ai/tests/ai/test_ai_functions.py +53 -8
- mage_ai/tests/api/endpoints/test_oauths.py +33 -0
- mage_ai/tests/api/endpoints/test_projects.py +1 -0
- mage_ai/tests/api/endpoints/test_workspaces.py +55 -0
- mage_ai/tests/api/operations/test_base.py +7 -5
- mage_ai/tests/api/operations/test_operations.py +0 -1
- mage_ai/tests/api/operations/test_operations_with_hooks.py +622 -0
- mage_ai/tests/api/operations/test_syncs.py +0 -1
- mage_ai/tests/api/operations/test_users.py +13 -2
- mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
- mage_ai/tests/data_preparation/models/global_hooks/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +600 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +804 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +38 -0
- 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/data_preparation/test_repo_manager.py +11 -0
- mage_ai/tests/factory.py +105 -5
- mage_ai/tests/orchestration/queue/test_process_queue.py +15 -2
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
- mage_ai/tests/services/k8s/test_job_manager.py +38 -1
- mage_ai/tests/shared/mixins.py +328 -0
- mage_ai/tests/shared/test_hash.py +17 -1
- mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
- mage_ai/tests/streaming/sources/test_activemq.py +32 -0
- mage_ai/tests/streaming/sources/test_nats_js.py +32 -0
- mage_ai/tests/streaming/sources/test_source_factory.py +26 -1
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/METADATA +14 -4
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/RECORD +467 -386
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/WHEEL +1 -1
- mage_ai/authentication/oauth/active_directory.py +0 -17
- mage_ai/server/frontend_dist/_next/static/chunks/1125-91d3ce33140ef041.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1749-607014ecf28268bf.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-573c7fc7ad84da6e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3004-231cad9039ae5dcb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3419-0873e170ef7d6303.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-335766a915ee2fa9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-8be2e0a3fe0ba64b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5499-bca977f466e259e1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/553-edf533e634e85192.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-37c6091b29a1fe53.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/600-0733eb84f0a0a9e0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6333-95ad799d13326dce.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-2a171fe616310f60.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8224-39a93ee1058b6069.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8264-6ef8fdb195694807.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-1b5c4b071ed544c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/framework-7c365855dab1bf41.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1203afde83fa2d6e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/block-layout-c465c14d48392b11.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-b1f8d5a7a9a30f2d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-93c094bad0f299fb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-891e5bd5935f7473.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-d2e4ee4e68d36807.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-4a49126fcfe8ced0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-5f8c5d0bc6ad1113.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-b4c0a36c69c346a4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a9266d353f288e8c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-b5c29c852262312e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-9f233917aa72ad82.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-5af599da035252a7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-8597f8e13d80ee48.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5e0d047a6c9cb1fc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-b0a508aa52914dad.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-074c32397d341de9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-50f5d8706ed0bc73.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-e151c1552fcb67bd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-95394769a783c6c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-8336c4326f1e7d96.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-01dd679e4a21e0d9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-4d9051c073a9b2ff.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-5a306deca6717862.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-0dbc5b11019e78a0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-578d862f3e56e6e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-1c0588d685b909b9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ffaab4c013e62ba1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-114000e84313994f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/icIDjCezcfhiKL87kgeSY/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/_O1kJQLGtZmoBMyWpQrea/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1125-91d3ce33140ef041.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1749-607014ecf28268bf.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-573c7fc7ad84da6e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3004-231cad9039ae5dcb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3419-0873e170ef7d6303.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-335766a915ee2fa9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-8be2e0a3fe0ba64b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5499-bca977f466e259e1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/553-edf533e634e85192.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-37c6091b29a1fe53.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/600-0733eb84f0a0a9e0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-95ad799d13326dce.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-2a171fe616310f60.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8224-39a93ee1058b6069.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-6ef8fdb195694807.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/9264-1b5c4b071ed544c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/framework-7c365855dab1bf41.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1203afde83fa2d6e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-c465c14d48392b11.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-b1f8d5a7a9a30f2d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-93c094bad0f299fb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-891e5bd5935f7473.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-d2e4ee4e68d36807.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4a49126fcfe8ced0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-5f8c5d0bc6ad1113.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-b4c0a36c69c346a4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a9266d353f288e8c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-b5c29c852262312e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-9f233917aa72ad82.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-5af599da035252a7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-8597f8e13d80ee48.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5e0d047a6c9cb1fc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-b0a508aa52914dad.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-074c32397d341de9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-50f5d8706ed0bc73.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-e151c1552fcb67bd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-95394769a783c6c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-8336c4326f1e7d96.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-01dd679e4a21e0d9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-4d9051c073a9b2ff.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-5a306deca6717862.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-0dbc5b11019e78a0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-578d862f3e56e6e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-1c0588d685b909b9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ffaab4c013e62ba1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-114000e84313994f.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{icIDjCezcfhiKL87kgeSY → N3FS4bHv0jpYeeg672uYK}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{_O1kJQLGtZmoBMyWpQrea → aoO6jYZLVlUGCCdY-wmy8}/_ssgManifest.js +0 -0
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.45.dist-info → mage_ai-0.9.47.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:
|
|
@@ -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
|
|
@@ -12,6 +12,7 @@ from mage_ai.data_preparation.models.block.spark.constants import (
|
|
|
12
12
|
from mage_ai.data_preparation.models.project import Project
|
|
13
13
|
from mage_ai.data_preparation.models.project.constants import FeatureUUID
|
|
14
14
|
from mage_ai.services.spark.api.service import API
|
|
15
|
+
from mage_ai.services.spark.constants import ComputeServiceUUID
|
|
15
16
|
from mage_ai.services.spark.models.applications import Application
|
|
16
17
|
from mage_ai.services.spark.models.jobs import Job
|
|
17
18
|
from mage_ai.services.spark.models.sqls import Sql
|
|
@@ -30,6 +31,16 @@ class SparkBlock:
|
|
|
30
31
|
|
|
31
32
|
return self._spark_session_current
|
|
32
33
|
|
|
34
|
+
@property
|
|
35
|
+
def compute_service_uuid(self) -> ComputeServiceUUID:
|
|
36
|
+
if self._compute_service_uuid:
|
|
37
|
+
return self._compute_service_uuid
|
|
38
|
+
self._compute_service_uuid = get_compute_service(
|
|
39
|
+
ignore_active_kernel=True,
|
|
40
|
+
repo_config=self.repo_config,
|
|
41
|
+
)
|
|
42
|
+
return self._compute_service_uuid
|
|
43
|
+
|
|
33
44
|
def spark_session_application(self) -> Application:
|
|
34
45
|
if not self.spark_session:
|
|
35
46
|
return
|
|
@@ -40,7 +51,7 @@ class SparkBlock:
|
|
|
40
51
|
if value_tup:
|
|
41
52
|
application_id = value_tup[1]
|
|
42
53
|
|
|
43
|
-
return Application(
|
|
54
|
+
return Application.load(
|
|
44
55
|
id=application_id,
|
|
45
56
|
spark_ui_url=self.spark_session.sparkContext.uiWebUrl,
|
|
46
57
|
)
|
|
@@ -51,7 +62,13 @@ class SparkBlock:
|
|
|
51
62
|
)
|
|
52
63
|
|
|
53
64
|
def is_using_spark(self) -> bool:
|
|
54
|
-
return
|
|
65
|
+
return self.compute_service_uuid in [
|
|
66
|
+
ComputeServiceUUID.AWS_EMR,
|
|
67
|
+
ComputeServiceUUID.STANDALONE_CLUSTER,
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
def should_track_spark(self) -> bool:
|
|
71
|
+
return self.is_using_spark() and self.compute_management_enabled()
|
|
55
72
|
|
|
56
73
|
def execution_states(self, cache: bool = False) -> Dict:
|
|
57
74
|
jobs_cache = self.__load_cache()
|
|
@@ -82,33 +99,40 @@ class SparkBlock:
|
|
|
82
99
|
def jobs_during_execution(self) -> List[Job]:
|
|
83
100
|
self.__load_spark_job_submission_timestamps()
|
|
84
101
|
|
|
85
|
-
if self.execution_timestamp_start:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
if not self.execution_timestamp_start and self.execution_uuid_start:
|
|
103
|
+
return []
|
|
104
|
+
|
|
105
|
+
def _filter(
|
|
106
|
+
job: Job,
|
|
107
|
+
block_uuid=self.uuid,
|
|
108
|
+
compute_service_uuid=self.compute_service_uuid,
|
|
109
|
+
execution_timestamp_end: float = self.execution_timestamp_end,
|
|
110
|
+
execution_timestamp_start: float = self.execution_timestamp_start,
|
|
111
|
+
execution_uuid_start=self.execution_uuid_start,
|
|
112
|
+
) -> bool:
|
|
113
|
+
if ComputeServiceUUID.AWS_EMR == compute_service_uuid:
|
|
114
|
+
key = self.execution_uuid_start or self.execution_timestamp_start
|
|
115
|
+
return job.name == f'{block_uuid}:{key}'
|
|
116
|
+
|
|
117
|
+
if not job.submission_time:
|
|
118
|
+
return False
|
|
119
|
+
|
|
120
|
+
if isinstance(job.submission_time, str):
|
|
121
|
+
submission_timestamp = dateutil.parser.parse(job.submission_time).timestamp()
|
|
122
|
+
elif isinstance(job.submission_time, float) or isinstance(job.submission_time, int):
|
|
123
|
+
submission_timestamp = datetime.fromtimestamp(job.submission_time)
|
|
124
|
+
|
|
125
|
+
return execution_timestamp_start and \
|
|
126
|
+
execution_timestamp_end and \
|
|
127
|
+
submission_timestamp >= execution_timestamp_start and \
|
|
128
|
+
(
|
|
129
|
+
not execution_timestamp_end or
|
|
130
|
+
submission_timestamp <= execution_timestamp_end
|
|
131
|
+
)
|
|
108
132
|
|
|
109
|
-
|
|
133
|
+
jobs = self.__get_jobs(application=self.execution_start_application)
|
|
110
134
|
|
|
111
|
-
return []
|
|
135
|
+
return list(filter(_filter, jobs or []))
|
|
112
136
|
|
|
113
137
|
def stages_during_execution(self, jobs: List[Job]):
|
|
114
138
|
if not jobs:
|
|
@@ -122,7 +146,7 @@ class SparkBlock:
|
|
|
122
146
|
|
|
123
147
|
stages = self.__get_stages(application=self.execution_start_application)
|
|
124
148
|
|
|
125
|
-
return list(filter(_filter, stages))
|
|
149
|
+
return list(filter(_filter, stages or []))
|
|
126
150
|
|
|
127
151
|
def sqls_during_execution(self, jobs: List[Job]):
|
|
128
152
|
if not jobs:
|
|
@@ -140,7 +164,7 @@ class SparkBlock:
|
|
|
140
164
|
|
|
141
165
|
sqls = self.__get_sqls(application=self.execution_start_application)
|
|
142
166
|
|
|
143
|
-
return list(filter(_filter, sqls))
|
|
167
|
+
return list(filter(_filter, sqls or []))
|
|
144
168
|
|
|
145
169
|
def clear_spark_jobs_cache(self) -> None:
|
|
146
170
|
if os.path.exists(self.spark_jobs_full_path):
|
|
@@ -155,13 +179,24 @@ class SparkBlock:
|
|
|
155
179
|
for application in applications:
|
|
156
180
|
Application.cache_application(application)
|
|
157
181
|
|
|
158
|
-
def set_spark_job_execution_start(self) -> None:
|
|
182
|
+
def set_spark_job_execution_start(self, execution_uuid: str = None) -> None:
|
|
159
183
|
self.execution_timestamp_start = datetime.utcnow().timestamp()
|
|
160
184
|
application = self.spark_session_application()
|
|
161
185
|
|
|
186
|
+
if execution_uuid:
|
|
187
|
+
self.execution_uuid = execution_uuid
|
|
188
|
+
|
|
189
|
+
if self.spark_session and self.spark_session.sparkContext:
|
|
190
|
+
key = f'{self.uuid}:{self.execution_uuid or self.execution_timestamp_start}'
|
|
191
|
+
# For jobs
|
|
192
|
+
self.spark_session.sparkContext.setLocalProperty('callSite.short', key)
|
|
193
|
+
# For stages
|
|
194
|
+
self.spark_session.sparkContext.setLocalProperty('callSite.long', key)
|
|
195
|
+
|
|
162
196
|
self.__update_spark_jobs_cache(
|
|
163
197
|
dict(
|
|
164
198
|
application=application.to_dict() if application else None,
|
|
199
|
+
execution_uuid=self.execution_uuid,
|
|
165
200
|
submission_timestamp=self.execution_timestamp_start,
|
|
166
201
|
),
|
|
167
202
|
'before',
|
|
@@ -187,7 +222,7 @@ class SparkBlock:
|
|
|
187
222
|
|
|
188
223
|
if application:
|
|
189
224
|
build_options.update(dict(
|
|
190
|
-
application_id=application.
|
|
225
|
+
application_id=application.calculated_id(),
|
|
191
226
|
application_spark_ui_url=application.spark_ui_url,
|
|
192
227
|
))
|
|
193
228
|
else:
|
|
@@ -207,7 +242,7 @@ class SparkBlock:
|
|
|
207
242
|
else:
|
|
208
243
|
applications = api.applications_sync()
|
|
209
244
|
if applications:
|
|
210
|
-
jobs = api.jobs_sync(applications[0].
|
|
245
|
+
jobs = api.jobs_sync(applications[0].calculated_id())
|
|
211
246
|
|
|
212
247
|
return sorted(
|
|
213
248
|
jobs,
|
|
@@ -231,7 +266,7 @@ class SparkBlock:
|
|
|
231
266
|
applications = api.applications_sync()
|
|
232
267
|
|
|
233
268
|
if applications:
|
|
234
|
-
stages = api.stages_sync(applications[0].
|
|
269
|
+
stages = api.stages_sync(applications[0].calculated_id(), dict(
|
|
235
270
|
quantiles='0.01,0.25,0.5,0.75,0.99',
|
|
236
271
|
withSummaries=True,
|
|
237
272
|
))
|
|
@@ -253,7 +288,7 @@ class SparkBlock:
|
|
|
253
288
|
|
|
254
289
|
sqls = []
|
|
255
290
|
if applications:
|
|
256
|
-
sqls = api.sqls_sync(applications[0].
|
|
291
|
+
sqls = api.sqls_sync(applications[0].calculated_id(), dict(
|
|
257
292
|
length=9999,
|
|
258
293
|
))
|
|
259
294
|
|
|
@@ -304,6 +339,13 @@ class SparkBlock:
|
|
|
304
339
|
f.write(json.dumps(data))
|
|
305
340
|
|
|
306
341
|
def __load_spark_job_submission_timestamps(self) -> None:
|
|
342
|
+
self.execution_end_application = None
|
|
343
|
+
self.execution_start_application = None
|
|
344
|
+
self.execution_timestamp_end = None
|
|
345
|
+
self.execution_timestamp_start = None
|
|
346
|
+
self.execution_uuid_end = None
|
|
347
|
+
self.execution_uuid_start = None
|
|
348
|
+
|
|
307
349
|
jobs_cache = self.__load_cache()
|
|
308
350
|
if jobs_cache:
|
|
309
351
|
before = jobs_cache.get('before')
|
|
@@ -311,6 +353,9 @@ class SparkBlock:
|
|
|
311
353
|
self.execution_timestamp_start = (before or {}).get(
|
|
312
354
|
'submission_timestamp',
|
|
313
355
|
)
|
|
356
|
+
self.execution_uuid_start = (before or {}).get(
|
|
357
|
+
'execution_uuid',
|
|
358
|
+
)
|
|
314
359
|
self.execution_start_application = (before or {}).get(
|
|
315
360
|
'application',
|
|
316
361
|
)
|
|
@@ -324,6 +369,9 @@ class SparkBlock:
|
|
|
324
369
|
self.execution_timestamp_end = (after or {}).get(
|
|
325
370
|
'submission_timestamp',
|
|
326
371
|
)
|
|
372
|
+
self.execution_uuid_end = (after or {}).get(
|
|
373
|
+
'execution_uuid',
|
|
374
|
+
)
|
|
327
375
|
self.execution_end_application = (after or {}).get(
|
|
328
376
|
'application',
|
|
329
377
|
)
|
|
@@ -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(
|
|
@@ -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
|
|
|
File without changes
|