mage-ai 0.9.70__py3-none-any.whl → 0.9.71__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/ai/utils/xgboost.py +222 -0
- mage_ai/api/errors.py +37 -25
- mage_ai/api/operations/base.py +13 -1
- mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
- mage_ai/api/policies/BlockOutputPolicy.py +40 -17
- mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
- mage_ai/api/policies/KernelPolicy.py +55 -32
- mage_ai/api/policies/KernelProcessPolicy.py +56 -0
- mage_ai/api/policies/OutputPolicy.py +73 -41
- mage_ai/api/policies/PipelinePolicy.py +206 -138
- mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
- mage_ai/api/presenters/BlockPresenter.py +1 -1
- mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
- mage_ai/api/presenters/KernelPresenter.py +5 -26
- mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
- mage_ai/api/presenters/PipelinePresenter.py +18 -5
- mage_ai/api/presenters/StatusPresenter.py +2 -0
- mage_ai/api/presenters/SyncPresenter.py +25 -0
- mage_ai/api/resources/AutocompleteItemResource.py +1 -1
- mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
- mage_ai/api/resources/BlockOutputResource.py +42 -9
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/BlockRunResource.py +27 -22
- mage_ai/api/resources/ClusterResource.py +4 -1
- mage_ai/api/resources/CustomTemplateResource.py +34 -14
- mage_ai/api/resources/DataProviderResource.py +1 -1
- mage_ai/api/resources/ExecutionStateResource.py +3 -1
- mage_ai/api/resources/FileContentResource.py +8 -2
- mage_ai/api/resources/FileResource.py +10 -4
- mage_ai/api/resources/FileVersionResource.py +3 -1
- mage_ai/api/resources/GitBranchResource.py +46 -9
- mage_ai/api/resources/GlobalDataProductResource.py +44 -7
- mage_ai/api/resources/GlobalHookResource.py +4 -1
- mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
- mage_ai/api/resources/IntegrationSourceResource.py +8 -4
- mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
- mage_ai/api/resources/KernelProcessResource.py +44 -0
- mage_ai/api/resources/KernelResource.py +25 -3
- mage_ai/api/resources/OutputResource.py +33 -11
- mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
- mage_ai/api/resources/PipelineInteractionResource.py +31 -15
- mage_ai/api/resources/PipelineResource.py +250 -123
- mage_ai/api/resources/PipelineRunResource.py +11 -3
- mage_ai/api/resources/PipelineScheduleResource.py +7 -2
- mage_ai/api/resources/PipelineTriggerResource.py +6 -1
- mage_ai/api/resources/ProjectResource.py +18 -7
- mage_ai/api/resources/SecretResource.py +1 -1
- mage_ai/api/resources/SeedResource.py +8 -1
- mage_ai/api/resources/StatusResource.py +21 -6
- mage_ai/api/resources/SyncResource.py +6 -8
- mage_ai/api/resources/VariableResource.py +46 -26
- mage_ai/api/resources/VersionControlProjectResource.py +9 -2
- mage_ai/api/resources/WidgetResource.py +1 -1
- mage_ai/api/resources/WorkspaceResource.py +1 -1
- mage_ai/api/views.py +47 -40
- mage_ai/authentication/permissions/seed.py +16 -2
- mage_ai/authentication/providers/oidc.py +21 -1
- mage_ai/autocomplete/utils.py +13 -9
- mage_ai/cache/base.py +1 -1
- mage_ai/cache/block.py +18 -12
- mage_ai/cache/block_action_object/__init__.py +32 -4
- mage_ai/cache/file.py +22 -19
- mage_ai/cache/pipeline.py +18 -12
- mage_ai/cli/main.py +1 -0
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
- mage_ai/cluster_manager/config.py +2 -2
- mage_ai/cluster_manager/manage.py +1 -1
- mage_ai/cluster_manager/workspace/base.py +1 -1
- mage_ai/command_center/applications/factory.py +10 -7
- mage_ai/command_center/files/factory.py +17 -15
- mage_ai/command_center/utils.py +25 -13
- mage_ai/data/__init__.py +0 -0
- mage_ai/data/constants.py +45 -0
- mage_ai/data/models/__init__.py +0 -0
- mage_ai/data/models/base.py +119 -0
- mage_ai/data/models/constants.py +1 -0
- mage_ai/data/models/generator.py +115 -0
- mage_ai/data/models/manager.py +168 -0
- mage_ai/data/models/pyarrow/__init__.py +0 -0
- mage_ai/data/models/pyarrow/record_batch.py +55 -0
- mage_ai/data/models/pyarrow/shared.py +21 -0
- mage_ai/data/models/pyarrow/table.py +8 -0
- mage_ai/data/models/reader.py +103 -0
- mage_ai/data/models/utils.py +59 -0
- mage_ai/data/models/writer.py +91 -0
- mage_ai/data/tabular/__init__.py +0 -0
- mage_ai/data/tabular/constants.py +23 -0
- mage_ai/data/tabular/mocks.py +19 -0
- mage_ai/data/tabular/models.py +126 -0
- mage_ai/data/tabular/reader.py +602 -0
- mage_ai/data/tabular/utils.py +102 -0
- mage_ai/data/tabular/writer.py +266 -0
- mage_ai/data/variables/__init__.py +0 -0
- mage_ai/data/variables/wrapper.py +54 -0
- mage_ai/data_cleaner/analysis/charts.py +61 -39
- mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
- mage_ai/data_cleaner/estimators/encoders.py +5 -2
- mage_ai/data_integrations/utils/scheduler.py +16 -11
- mage_ai/data_preparation/decorators.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +237 -155
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +1 -1
- mage_ai/data_preparation/git/__init__.py +27 -7
- mage_ai/data_preparation/git/api.py +7 -1
- mage_ai/data_preparation/git/utils.py +22 -16
- mage_ai/data_preparation/logging/logger_manager.py +4 -3
- mage_ai/data_preparation/models/block/__init__.py +1542 -878
- mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
- mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
- mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
- mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
- mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
- mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
- mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
- mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
- mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +291 -168
- mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
- mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
- mage_ai/data_preparation/models/block/extension/utils.py +10 -1
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +10 -1
- mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
- mage_ai/data_preparation/models/block/outputs.py +722 -0
- mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
- mage_ai/data_preparation/models/block/r/__init__.py +56 -38
- mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
- mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
- mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
- mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
- mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
- mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
- mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
- mage_ai/data_preparation/models/block/utils.py +127 -70
- mage_ai/data_preparation/models/constants.py +19 -14
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
- mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
- mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
- mage_ai/data_preparation/models/file.py +41 -28
- mage_ai/data_preparation/models/global_data_product/__init__.py +88 -58
- mage_ai/data_preparation/models/global_hooks/models.py +1 -0
- mage_ai/data_preparation/models/interfaces.py +29 -0
- mage_ai/data_preparation/models/pipeline.py +365 -180
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
- mage_ai/data_preparation/models/pipelines/seed.py +1 -1
- mage_ai/data_preparation/models/project/__init__.py +66 -18
- mage_ai/data_preparation/models/project/constants.py +2 -0
- mage_ai/data_preparation/models/triggers/__init__.py +120 -24
- mage_ai/data_preparation/models/utils.py +467 -17
- mage_ai/data_preparation/models/variable.py +1028 -137
- mage_ai/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/variables/cache.py +149 -0
- mage_ai/data_preparation/models/variables/constants.py +72 -0
- mage_ai/data_preparation/models/variables/summarizer.py +336 -0
- mage_ai/data_preparation/models/variables/utils.py +77 -0
- mage_ai/data_preparation/models/widget/__init__.py +63 -41
- mage_ai/data_preparation/models/widget/charts.py +40 -27
- mage_ai/data_preparation/models/widget/constants.py +2 -0
- mage_ai/data_preparation/models/widget/utils.py +3 -3
- mage_ai/data_preparation/preferences.py +3 -3
- mage_ai/data_preparation/repo_manager.py +55 -21
- mage_ai/data_preparation/storage/base_storage.py +2 -2
- mage_ai/data_preparation/storage/gcs_storage.py +7 -4
- mage_ai/data_preparation/storage/local_storage.py +6 -3
- mage_ai/data_preparation/storage/s3_storage.py +5 -2
- mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
- mage_ai/data_preparation/variable_manager.py +281 -76
- mage_ai/io/base.py +3 -2
- mage_ai/io/bigquery.py +1 -0
- mage_ai/io/redshift.py +7 -5
- mage_ai/kernels/__init__.py +0 -0
- mage_ai/kernels/models.py +188 -0
- mage_ai/kernels/utils.py +169 -0
- mage_ai/orchestration/concurrency.py +6 -2
- mage_ai/orchestration/db/__init__.py +1 -0
- mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
- mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
- mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
- mage_ai/orchestration/db/models/oauth.py +2 -9
- mage_ai/orchestration/db/models/projects.py +10 -0
- mage_ai/orchestration/db/models/schedules.py +204 -187
- mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
- mage_ai/orchestration/db/models/utils.py +46 -5
- mage_ai/orchestration/metrics/pipeline_run.py +8 -9
- mage_ai/orchestration/notification/sender.py +1 -0
- mage_ai/orchestration/pipeline_scheduler_original.py +32 -8
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
- mage_ai/orchestration/run_status_checker.py +11 -4
- mage_ai/orchestration/triggers/api.py +12 -1
- mage_ai/presenters/charts/data_sources/base.py +4 -2
- mage_ai/presenters/charts/data_sources/block.py +15 -9
- mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
- mage_ai/presenters/charts/data_sources/constants.py +1 -0
- mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
- mage_ai/presenters/interactions/models.py +11 -7
- mage_ai/presenters/pages/loaders/pipelines.py +5 -3
- mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
- mage_ai/presenters/utils.py +2 -0
- mage_ai/server/api/blocks.py +2 -1
- mage_ai/server/api/downloads.py +5 -1
- mage_ai/server/api/triggers.py +3 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +5 -5
- mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1557-b3502f3f1aa92ac7.js → 1557-25a7d985d5564fd3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3763-61b542dafdbf5754.js → frontend_dist/_next/static/chunks/3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js → frontend_dist/_next/static/chunks/pages/overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-7181b086c93784d2.js → [...slug]-7e737f6fc7e83e9b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js → frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +6 -6
- mage_ai/server/frontend_dist/files.html +6 -6
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-data-products.html +6 -6
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +6 -6
- mage_ai/server/frontend_dist/manage/settings.html +6 -6
- mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist/manage/users.html +6 -6
- mage_ai/server/frontend_dist/manage.html +6 -6
- mage_ai/server/frontend_dist/oauth.html +5 -5
- mage_ai/server/frontend_dist/overview.html +6 -6
- mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +12 -12
- mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist/templates.html +6 -6
- mage_ai/server/frontend_dist/terminal.html +6 -6
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +6 -6
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1557-b3502f3f1aa92ac7.js → 1557-25a7d985d5564fd3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3763-61b542dafdbf5754.js → frontend_dist_base_path_template/_next/static/chunks/3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-597b74828bf105db.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-7181b086c93784d2.js → [...slug]-7e737f6fc7e83e9b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +12 -12
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/kernel_output_parser.py +4 -1
- mage_ai/server/scheduler_manager.py +9 -0
- mage_ai/server/server.py +35 -31
- mage_ai/server/utils/custom_output.py +284 -0
- mage_ai/server/utils/execute_custom_code.py +245 -0
- mage_ai/server/utils/output_display.py +123 -289
- mage_ai/server/websocket_server.py +116 -69
- mage_ai/services/k8s/config.py +23 -0
- mage_ai/services/k8s/job_manager.py +6 -1
- mage_ai/services/ssh/aws/emr/utils.py +8 -8
- mage_ai/settings/keys/auth.py +1 -0
- mage_ai/settings/platform/__init__.py +159 -38
- mage_ai/settings/platform/constants.py +5 -0
- mage_ai/settings/platform/utils.py +53 -10
- mage_ai/settings/repo.py +26 -12
- mage_ai/settings/server.py +128 -37
- mage_ai/shared/array.py +24 -1
- mage_ai/shared/complex.py +45 -0
- mage_ai/shared/config.py +2 -1
- mage_ai/shared/custom_logger.py +11 -0
- mage_ai/shared/dates.py +10 -6
- mage_ai/shared/files.py +63 -8
- mage_ai/shared/hash.py +33 -9
- mage_ai/shared/io.py +9 -5
- mage_ai/shared/models.py +82 -24
- mage_ai/shared/outputs.py +87 -0
- mage_ai/shared/parsers.py +141 -15
- mage_ai/shared/path_fixer.py +11 -7
- mage_ai/shared/singletons/__init__.py +0 -0
- mage_ai/shared/singletons/base.py +47 -0
- mage_ai/shared/singletons/memory.py +38 -0
- mage_ai/shared/strings.py +34 -1
- mage_ai/shared/yaml.py +24 -0
- mage_ai/streaming/sinks/oracledb.py +57 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/system/__init__.py +0 -0
- mage_ai/system/constants.py +14 -0
- mage_ai/system/memory/__init__.py +0 -0
- mage_ai/system/memory/constants.py +1 -0
- mage_ai/system/memory/manager.py +174 -0
- mage_ai/system/memory/presenters.py +158 -0
- mage_ai/system/memory/process.py +216 -0
- mage_ai/system/memory/samples.py +13 -0
- mage_ai/system/memory/utils.py +656 -0
- mage_ai/system/memory/wrappers.py +177 -0
- mage_ai/system/models.py +58 -0
- mage_ai/system/storage/__init__.py +0 -0
- mage_ai/system/storage/utils.py +29 -0
- mage_ai/tests/api/endpoints/mixins.py +2 -2
- mage_ai/tests/api/endpoints/test_blocks.py +2 -1
- mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
- mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
- mage_ai/tests/api/endpoints/test_projects.py +2 -1
- mage_ai/tests/api/operations/base/test_base.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
- mage_ai/tests/api/operations/test_syncs.py +6 -4
- mage_ai/tests/api/resources/test_pipeline_resource.py +9 -2
- mage_ai/tests/authentication/providers/test_oidc.py +59 -0
- mage_ai/tests/base_test.py +2 -2
- mage_ai/tests/data/__init__.py +0 -0
- mage_ai/tests/data/models/__init__.py +0 -0
- mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
- mage_ai/tests/data_preparation/git/test_git.py +4 -1
- mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +3 -2
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
- mage_ai/tests/data_preparation/models/test_block.py +115 -120
- mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
- mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
- mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
- mage_ai/tests/data_preparation/models/test_project.py +4 -1
- mage_ai/tests/data_preparation/models/test_utils.py +80 -0
- mage_ai/tests/data_preparation/models/test_variable.py +242 -69
- mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
- mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
- mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
- mage_ai/tests/factory.py +64 -43
- mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
- mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +3 -2
- mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
- mage_ai/tests/services/k8s/test_job_manager.py +18 -0
- mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
- mage_ai/tests/test_shared.py +61 -0
- mage_ai/usage_statistics/logger.py +7 -2
- mage_ai/utils/code.py +33 -19
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/METADATA +5 -2
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/RECORD +513 -417
- mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
- mage_ai/server/frontend_dist/_next/static/RhDiJSkcjCsh4xxX4BFBk/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-b9b85ba10667e654.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/TdpLLFome13qvM0gXvpHs/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-b9b85ba10667e654.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +0 -1
- mage_ai/shared/memory.py +0 -90
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
- /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
- /mage_ai/server/frontend_dist/_next/static/{RhDiJSkcjCsh4xxX4BFBk → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{TdpLLFome13qvM0gXvpHs → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
- /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.70.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import re
|
|
2
2
|
from os import path
|
|
3
|
-
from typing import Callable, Dict, List, Tuple, Union
|
|
3
|
+
from typing import Callable, Dict, List, Optional, Tuple, Union
|
|
4
4
|
|
|
5
5
|
from jinja2 import StrictUndefined, Template
|
|
6
6
|
from pandas import DataFrame
|
|
@@ -482,7 +482,7 @@ def remove_comments(text: str) -> str:
|
|
|
482
482
|
return '\n'.join(line for line in lines if not line.startswith('--'))
|
|
483
483
|
|
|
484
484
|
|
|
485
|
-
def extract_create_statement_table_name(text: str) -> str:
|
|
485
|
+
def extract_create_statement_table_name(text: str) -> Optional[str]:
|
|
486
486
|
create_table_pattern = r'create table(?: if not exists)*'
|
|
487
487
|
|
|
488
488
|
statement_partial, _ = extract_and_replace_text_between_strings(
|
|
@@ -507,7 +507,7 @@ def extract_create_statement_table_name(text: str) -> str:
|
|
|
507
507
|
|
|
508
508
|
def extract_insert_statement_table_names(text: str) -> List[str]:
|
|
509
509
|
matches = re.findall(
|
|
510
|
-
r'insert(
|
|
510
|
+
r'insert(?:\s+ignore)?(?:\s+overwrite)?(?:\s+into)?[\s]+([\w.]+)',
|
|
511
511
|
remove_comments(text),
|
|
512
512
|
re.IGNORECASE,
|
|
513
513
|
)
|
|
@@ -532,6 +532,24 @@ def extract_update_statement_table_names(text: str) -> List[str]:
|
|
|
532
532
|
return matches
|
|
533
533
|
|
|
534
534
|
|
|
535
|
+
def extract_full_table_name(text: str) -> Optional[str]:
|
|
536
|
+
if not text:
|
|
537
|
+
return None
|
|
538
|
+
|
|
539
|
+
table_name = extract_create_statement_table_name(text)
|
|
540
|
+
if table_name:
|
|
541
|
+
return table_name
|
|
542
|
+
|
|
543
|
+
matches = extract_insert_statement_table_names(text)
|
|
544
|
+
if len(matches) == 0:
|
|
545
|
+
matches = extract_update_statement_table_names(text)
|
|
546
|
+
|
|
547
|
+
if len(matches) == 0:
|
|
548
|
+
return None
|
|
549
|
+
|
|
550
|
+
return matches[len(matches) - 1]
|
|
551
|
+
|
|
552
|
+
|
|
535
553
|
def has_create_or_insert_statement(text: str) -> bool:
|
|
536
554
|
table_name = extract_create_statement_table_name(text)
|
|
537
555
|
if table_name:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import Any, Dict, List, Tuple
|
|
3
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
4
4
|
|
|
5
5
|
import pandas as pd
|
|
6
6
|
import simplejson
|
|
@@ -126,10 +126,12 @@ def get_all_ancestors(block) -> List:
|
|
|
126
126
|
List: A list of all ancestors of the block.
|
|
127
127
|
"""
|
|
128
128
|
arr = get_leaf_nodes(block, 'upstream_blocks', include_all_nodes=True)
|
|
129
|
-
return list(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
return list(
|
|
130
|
+
filter(
|
|
131
|
+
lambda x: x.uuid != block.uuid,
|
|
132
|
+
arr,
|
|
133
|
+
)
|
|
134
|
+
)
|
|
133
135
|
|
|
134
136
|
|
|
135
137
|
def get_all_descendants(block) -> List:
|
|
@@ -143,10 +145,12 @@ def get_all_descendants(block) -> List:
|
|
|
143
145
|
List: A list of all descendants of the block.
|
|
144
146
|
"""
|
|
145
147
|
arr = get_leaf_nodes(block, 'downstream_blocks', include_all_nodes=True)
|
|
146
|
-
return list(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
return list(
|
|
149
|
+
filter(
|
|
150
|
+
lambda x: x.uuid != block.uuid,
|
|
151
|
+
arr,
|
|
152
|
+
)
|
|
153
|
+
)
|
|
150
154
|
|
|
151
155
|
|
|
152
156
|
def get_leaf_nodes(
|
|
@@ -196,6 +200,7 @@ def output_variables(
|
|
|
196
200
|
include_df: bool = True,
|
|
197
201
|
input_args: List[Any] = None,
|
|
198
202
|
data_integration_settings_mapping: Dict = None,
|
|
203
|
+
max_results: Optional[int] = None,
|
|
199
204
|
) -> List[str]:
|
|
200
205
|
"""
|
|
201
206
|
Retrieve the output variables generated by a specified block within a pipeline.
|
|
@@ -222,8 +227,9 @@ def output_variables(
|
|
|
222
227
|
|
|
223
228
|
di_settings = None
|
|
224
229
|
if data_integration_settings_mapping:
|
|
225
|
-
di_settings = data_integration_settings_mapping.get(
|
|
226
|
-
|
|
230
|
+
di_settings = data_integration_settings_mapping.get(
|
|
231
|
+
block_uuid
|
|
232
|
+
) or data_integration_settings_mapping.get(block.uuid)
|
|
227
233
|
|
|
228
234
|
if block and not di_settings:
|
|
229
235
|
di_settings = block.get_data_integration_settings(
|
|
@@ -239,17 +245,18 @@ def output_variables(
|
|
|
239
245
|
if should_reduce_output(block):
|
|
240
246
|
all_variables = all_variable_uuids(
|
|
241
247
|
block,
|
|
248
|
+
max_results=max_results,
|
|
242
249
|
partition=execution_partition,
|
|
243
250
|
)
|
|
244
251
|
else:
|
|
245
252
|
all_variables = block.get_variables_by_block(
|
|
246
253
|
block_uuid=block_uuid,
|
|
247
254
|
dynamic_block_index=dynamic_block_index,
|
|
255
|
+
max_results=max_results,
|
|
248
256
|
partition=execution_partition,
|
|
249
257
|
)
|
|
250
258
|
|
|
251
|
-
output_variables = [v for v in all_variables
|
|
252
|
-
if is_output_variable(v, include_df=include_df)]
|
|
259
|
+
output_variables = [v for v in all_variables if is_output_variable(v, include_df=include_df)]
|
|
253
260
|
|
|
254
261
|
DX_PRINTER.error(
|
|
255
262
|
block=block,
|
|
@@ -420,8 +427,9 @@ def fetch_input_variables(
|
|
|
420
427
|
upstream_block_uuids = upstream_block_uuids_override
|
|
421
428
|
|
|
422
429
|
kwargs_vars = []
|
|
423
|
-
|
|
424
430
|
input_vars = []
|
|
431
|
+
input_variables_by_uuid = None
|
|
432
|
+
|
|
425
433
|
if input_args is not None:
|
|
426
434
|
input_vars = input_args
|
|
427
435
|
if upstream_block_uuids and not upstream_block_uuids_override:
|
|
@@ -434,16 +442,21 @@ def fetch_input_variables(
|
|
|
434
442
|
disable_dynamic_index_for_output_variables = False
|
|
435
443
|
# Fetch the data normally, then use the dynamic block index to select.
|
|
436
444
|
block_is_dynamic_block = DynamicBlockFlag.DYNAMIC in (dynamic_block_flags or [])
|
|
437
|
-
block_is_dynamic_block_child = DynamicBlockFlag.DYNAMIC_CHILD in (
|
|
445
|
+
block_is_dynamic_block_child = DynamicBlockFlag.DYNAMIC_CHILD in (
|
|
446
|
+
dynamic_block_flags or []
|
|
447
|
+
)
|
|
438
448
|
if block_is_dynamic_block and block_is_dynamic_block_child:
|
|
439
449
|
disable_dynamic_index_for_output_variables = True
|
|
440
450
|
|
|
441
451
|
if dynamic_block_indexes and (
|
|
442
|
-
not block_is_dynamic_block
|
|
443
|
-
not block_is_dynamic_block_child
|
|
444
|
-
len(dynamic_block_indexes) >= 2
|
|
452
|
+
not block_is_dynamic_block
|
|
453
|
+
or not block_is_dynamic_block_child
|
|
454
|
+
or len(dynamic_block_indexes) >= 2
|
|
445
455
|
):
|
|
446
|
-
for
|
|
456
|
+
for (
|
|
457
|
+
upstream_block_uuid,
|
|
458
|
+
dynamic_block_index_folder,
|
|
459
|
+
) in dynamic_block_indexes.items():
|
|
447
460
|
block = pipeline.get_block(upstream_block_uuid)
|
|
448
461
|
if block:
|
|
449
462
|
upstream_is_dynamic_block = is_dynamic_block(block)
|
|
@@ -455,11 +468,12 @@ def fetch_input_variables(
|
|
|
455
468
|
- Upstream is a dynamic child block
|
|
456
469
|
- Current block is a virtual clone of the original one
|
|
457
470
|
"""
|
|
458
|
-
if
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
471
|
+
if (
|
|
472
|
+
upstream_is_dynamic_block
|
|
473
|
+
and upstream_is_dynamic_block_child
|
|
474
|
+
and metadata
|
|
475
|
+
and metadata.get('clone_original')
|
|
476
|
+
):
|
|
463
477
|
dynamic_block_index_mapping[block.uuid] = extract_dynamic_block_index(
|
|
464
478
|
upstream_block_uuid,
|
|
465
479
|
)
|
|
@@ -493,8 +507,9 @@ def fetch_input_variables(
|
|
|
493
507
|
input_args=input_args,
|
|
494
508
|
data_integration_settings_mapping=data_integration_settings_mapping,
|
|
495
509
|
**(
|
|
496
|
-
{}
|
|
497
|
-
|
|
510
|
+
{}
|
|
511
|
+
if disable_dynamic_index_for_output_variables
|
|
512
|
+
else dynamic_block_index_values_for_output_variables
|
|
498
513
|
),
|
|
499
514
|
)
|
|
500
515
|
# Block UUIDs
|
|
@@ -533,28 +548,34 @@ def fetch_input_variables(
|
|
|
533
548
|
# Block output variables for upstream_block_uuid
|
|
534
549
|
variables = input_variables_by_uuid[upstream_block_uuid]
|
|
535
550
|
|
|
536
|
-
dynamic_block_index_for_output_variable =
|
|
551
|
+
dynamic_block_index_for_output_variable = (
|
|
537
552
|
dynamic_block_index_values_for_output_variables.get('dynamic_block_index')
|
|
553
|
+
)
|
|
538
554
|
|
|
539
|
-
if
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
555
|
+
if (
|
|
556
|
+
not disable_dynamic_index_for_output_variables
|
|
557
|
+
and dynamic_block_index_mapping
|
|
558
|
+
and upstream_block_uuid in dynamic_block_index_mapping
|
|
559
|
+
):
|
|
560
|
+
dynamic_block_index_for_output_variable = dynamic_block_index_mapping[
|
|
561
|
+
upstream_block_uuid
|
|
562
|
+
]
|
|
545
563
|
|
|
546
564
|
# Fetch variable values
|
|
547
565
|
if should_reduce:
|
|
548
|
-
variable_values = [
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
566
|
+
variable_values = [
|
|
567
|
+
reduce_output_from_block(
|
|
568
|
+
upstream_block,
|
|
569
|
+
variable_uuid,
|
|
570
|
+
from_notebook=from_notebook,
|
|
571
|
+
global_vars=global_vars,
|
|
572
|
+
input_args=input_args,
|
|
573
|
+
partition=execution_partition,
|
|
574
|
+
raise_exception=True,
|
|
575
|
+
spark=spark,
|
|
576
|
+
)
|
|
577
|
+
for variable_uuid in variables
|
|
578
|
+
]
|
|
558
579
|
else:
|
|
559
580
|
# Getting input variables from cache the cache is not empty
|
|
560
581
|
if block_run_outputs_cache:
|
|
@@ -571,6 +592,17 @@ def fetch_input_variables(
|
|
|
571
592
|
raise_exception=True,
|
|
572
593
|
spark=spark,
|
|
573
594
|
dynamic_block_index=dynamic_block_index_for_output_variable,
|
|
595
|
+
read_chunks=current_block.upstream_chunks(upstream_block_uuid)
|
|
596
|
+
if current_block
|
|
597
|
+
else None,
|
|
598
|
+
read_batch_settings=current_block.upstream_batch_settings(
|
|
599
|
+
upstream_block_uuid
|
|
600
|
+
)
|
|
601
|
+
if current_block
|
|
602
|
+
else None,
|
|
603
|
+
input_data_types=current_block.input_data_types(upstream_block_uuid)
|
|
604
|
+
if current_block
|
|
605
|
+
else None,
|
|
574
606
|
)
|
|
575
607
|
for var in variables
|
|
576
608
|
]
|
|
@@ -584,10 +616,11 @@ def fetch_input_variables(
|
|
|
584
616
|
upstream_in_dynamic_upstream = True
|
|
585
617
|
|
|
586
618
|
# This is for blocks with multiple upstream dynamic blocks or dynamic child blocks.
|
|
587
|
-
if
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
619
|
+
if (
|
|
620
|
+
dynamic_block_indexes
|
|
621
|
+
and len(dynamic_block_indexes) >= 2
|
|
622
|
+
and upstream_block_uuid in dynamic_block_indexes
|
|
623
|
+
):
|
|
591
624
|
input_value = None
|
|
592
625
|
|
|
593
626
|
input_data = variable_values[0]
|
|
@@ -630,7 +663,9 @@ def fetch_input_variables(
|
|
|
630
663
|
# SQL blocks will return a Pandas DataFrame
|
|
631
664
|
if type(arr) is pd.DataFrame:
|
|
632
665
|
val = arr.iloc[dynamic_block_index].to_dict()
|
|
633
|
-
elif
|
|
666
|
+
elif (
|
|
667
|
+
type(arr) is list and len(arr) >= 1 and dynamic_block_index < len(arr)
|
|
668
|
+
):
|
|
634
669
|
val = arr[dynamic_block_index]
|
|
635
670
|
|
|
636
671
|
input_vars[idx] = val
|
|
@@ -699,6 +734,17 @@ def fetch_input_variables(
|
|
|
699
734
|
input_args=input_args,
|
|
700
735
|
partition=execution_partition,
|
|
701
736
|
spark=spark,
|
|
737
|
+
read_chunks=current_block.upstream_chunks(upstream_block_uuid)
|
|
738
|
+
if current_block
|
|
739
|
+
else None,
|
|
740
|
+
read_batch_settings=current_block.upstream_batch_settings(
|
|
741
|
+
upstream_block_uuid
|
|
742
|
+
)
|
|
743
|
+
if current_block
|
|
744
|
+
else None,
|
|
745
|
+
input_data_types=current_block.input_data_types(upstream_block_uuid)
|
|
746
|
+
if current_block
|
|
747
|
+
else None,
|
|
702
748
|
)
|
|
703
749
|
|
|
704
750
|
if type(variable_values) is list and len(variable_values) == 1:
|
|
@@ -712,10 +758,11 @@ def fetch_input_variables(
|
|
|
712
758
|
final_value.append(val)
|
|
713
759
|
|
|
714
760
|
# output_0 is the metadata for dynamic blocks
|
|
715
|
-
if
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
761
|
+
if (
|
|
762
|
+
dynamic_block_index is not None
|
|
763
|
+
and upstream_is_dynamic
|
|
764
|
+
and len(variables) >= 2
|
|
765
|
+
):
|
|
719
766
|
var = variables[1]
|
|
720
767
|
variable_values = pipeline.get_block_variable(
|
|
721
768
|
upstream_block_uuid,
|
|
@@ -725,15 +772,27 @@ def fetch_input_variables(
|
|
|
725
772
|
input_args=input_args,
|
|
726
773
|
partition=execution_partition,
|
|
727
774
|
spark=spark,
|
|
775
|
+
read_chunks=current_block.upstream_chunks(upstream_block_uuid)
|
|
776
|
+
if current_block
|
|
777
|
+
else None,
|
|
778
|
+
read_batch_settings=current_block.upstream_batch_settings(
|
|
779
|
+
upstream_block_uuid
|
|
780
|
+
)
|
|
781
|
+
if current_block
|
|
782
|
+
else None,
|
|
783
|
+
input_data_types=current_block.input_data_types(upstream_block_uuid)
|
|
784
|
+
if current_block
|
|
785
|
+
else None,
|
|
728
786
|
)
|
|
729
787
|
if dynamic_block_index < len(variable_values):
|
|
730
788
|
val = variable_values[dynamic_block_index]
|
|
731
789
|
kwargs_vars.append(val)
|
|
732
790
|
|
|
733
|
-
if (
|
|
734
|
-
or should_reduce)
|
|
735
|
-
|
|
736
|
-
|
|
791
|
+
if (
|
|
792
|
+
((upstream_is_dynamic and dynamic_block_index is not None) or should_reduce)
|
|
793
|
+
and len(final_value) >= 1
|
|
794
|
+
and all([type(v) is pd.DataFrame for v in final_value])
|
|
795
|
+
):
|
|
737
796
|
final_value = pd.concat(final_value)
|
|
738
797
|
|
|
739
798
|
if not should_reduce:
|
|
@@ -746,9 +805,11 @@ def fetch_input_variables(
|
|
|
746
805
|
else:
|
|
747
806
|
final_value = final_value[dynamic_block_index]
|
|
748
807
|
|
|
749
|
-
if
|
|
750
|
-
type(final_value) is
|
|
751
|
-
|
|
808
|
+
if (
|
|
809
|
+
type(final_value) is not pd.DataFrame
|
|
810
|
+
and type(final_value) is list
|
|
811
|
+
and len(final_value) == 1
|
|
812
|
+
):
|
|
752
813
|
final_value = final_value[0]
|
|
753
814
|
|
|
754
815
|
input_vars[idx] = final_value
|
|
@@ -758,7 +819,7 @@ def fetch_input_variables(
|
|
|
758
819
|
input_vars=input_vars,
|
|
759
820
|
kwargs_vars=kwargs_vars,
|
|
760
821
|
upstream_block_uuids_final=upstream_block_uuids_final,
|
|
761
|
-
__uuid='output_variables'
|
|
822
|
+
__uuid='output_variables',
|
|
762
823
|
)
|
|
763
824
|
|
|
764
825
|
if kwargs_vars:
|
|
@@ -772,7 +833,7 @@ def fetch_input_variables(
|
|
|
772
833
|
output = remote_block_dict
|
|
773
834
|
else:
|
|
774
835
|
output = RemoteBlock.load(**remote_block_dict).get_outputs()
|
|
775
|
-
|
|
836
|
+
remote_blocks_output.append(output)
|
|
776
837
|
|
|
777
838
|
for kwargs in kwargs_vars:
|
|
778
839
|
if kwargs.get('remote_blocks'):
|
|
@@ -792,9 +853,7 @@ def serialize_output(
|
|
|
792
853
|
):
|
|
793
854
|
if type(data) is pd.DataFrame:
|
|
794
855
|
if csv_lines_only:
|
|
795
|
-
data = dict(
|
|
796
|
-
table=data.to_csv(header=True, index=False).strip('\n').split('\n')
|
|
797
|
-
)
|
|
856
|
+
data = dict(table=data.to_csv(header=True, index=False).strip('\n').split('\n'))
|
|
798
857
|
else:
|
|
799
858
|
row_count, column_count = data.shape
|
|
800
859
|
|
|
@@ -802,9 +861,7 @@ def serialize_output(
|
|
|
802
861
|
data = dict(
|
|
803
862
|
sample_data=dict(
|
|
804
863
|
columns=columns_to_display,
|
|
805
|
-
rows=json.loads(
|
|
806
|
-
data[columns_to_display].to_json(orient='split')
|
|
807
|
-
)['data']
|
|
864
|
+
rows=json.loads(data[columns_to_display].to_json(orient='split'))['data'],
|
|
808
865
|
),
|
|
809
866
|
shape=[row_count, column_count],
|
|
810
867
|
type=DataType.TABLE,
|
|
@@ -812,11 +869,11 @@ def serialize_output(
|
|
|
812
869
|
)
|
|
813
870
|
elif is_geo_dataframe(data):
|
|
814
871
|
data = dict(
|
|
815
|
-
text_data=f
|
|
872
|
+
text_data=f"""Use the code in a scratchpad to get the output of the block:
|
|
816
873
|
|
|
817
874
|
from mage_ai.data_preparation.variable_manager import get_variable
|
|
818
875
|
df = get_variable('{block.pipeline.uuid}', '{block.uuid}', 'df')
|
|
819
|
-
|
|
876
|
+
""",
|
|
820
877
|
type=DataType.TEXT,
|
|
821
878
|
variable_uuid=variable_uuid,
|
|
822
879
|
)
|
|
@@ -842,7 +899,7 @@ df = get_variable('{block.pipeline.uuid}', '{block.uuid}', 'df')
|
|
|
842
899
|
data = dict(
|
|
843
900
|
sample_data=dict(
|
|
844
901
|
columns=columns_to_display,
|
|
845
|
-
rows=json.loads(df[columns_to_display].to_json(orient='split'))['data']
|
|
902
|
+
rows=json.loads(df[columns_to_display].to_json(orient='split'))['data'],
|
|
846
903
|
),
|
|
847
904
|
type=DataType.TABLE,
|
|
848
905
|
variable_uuid=variable_uuid,
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from enum import Enum
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
'metadata',
|
|
8
|
-
'statistics',
|
|
9
|
-
'insights',
|
|
10
|
-
'suggestions',
|
|
11
|
-
]
|
|
4
|
+
from mage_ai.data_preparation.models.variables.constants import (
|
|
5
|
+
VariableAggregateDataType,
|
|
12
6
|
)
|
|
7
|
+
|
|
8
|
+
DATAFRAME_ANALYSIS_KEYS = frozenset([
|
|
9
|
+
VariableAggregateDataType.INSIGHTS.value,
|
|
10
|
+
VariableAggregateDataType.METADATA.value,
|
|
11
|
+
VariableAggregateDataType.STATISTICS.value,
|
|
12
|
+
VariableAggregateDataType.SUGGESTIONS.value,
|
|
13
|
+
])
|
|
14
|
+
DATA_INTEGRATION_CATALOG_FILE = 'data_integration_catalog.json'
|
|
13
15
|
DATAFRAME_ANALYSIS_MAX_COLUMNS = 100
|
|
14
16
|
DATAFRAME_ANALYSIS_MAX_ROWS = 100_000
|
|
15
17
|
DATAFRAME_SAMPLE_COUNT = 1000
|
|
16
18
|
DATAFRAME_SAMPLE_COUNT_PREVIEW = 10
|
|
17
19
|
DATAFRAME_SAMPLE_MAX_COLUMNS = 1000
|
|
18
|
-
|
|
20
|
+
DYNAMIC_CHILD_BLOCK_SAMPLE_COUNT_PREVIEW = 10
|
|
21
|
+
LOGS_SUBDIR = '.logs'
|
|
19
22
|
MAX_PRINT_OUTPUT_LINES = int(os.getenv('MAX_PRINT_OUTPUT_LINES', 1000) or 1000)
|
|
23
|
+
MAX_RESULTS_FOR_BLOCK_OUTPUTS_PREVIEW = 10
|
|
20
24
|
PIPELINE_CONFIG_FILE = 'metadata.yaml'
|
|
21
25
|
PIPELINE_MAX_FILE_SIZE = 500000 # maximum size of a pipeline import zip in kb (500Mb)
|
|
22
26
|
PIPELINES_FOLDER = 'pipelines'
|
|
@@ -103,9 +107,9 @@ class PipelineType(str, Enum):
|
|
|
103
107
|
|
|
104
108
|
|
|
105
109
|
class PipelineStatus(str, Enum):
|
|
106
|
-
ACTIVE = 'active',
|
|
107
|
-
INACTIVE = 'inactive',
|
|
108
|
-
NO_SCHEDULES = 'no_schedules', # No triggers
|
|
110
|
+
ACTIVE = ('active',) # At least one active trigger
|
|
111
|
+
INACTIVE = ('inactive',) # All inactive triggers
|
|
112
|
+
NO_SCHEDULES = ('no_schedules',) # No triggers
|
|
109
113
|
|
|
110
114
|
|
|
111
115
|
BLOCK_LANGUAGE_TO_FILE_EXTENSION = {
|
|
@@ -157,8 +161,9 @@ SINGULAR_FOLDER_BLOCK_TYPES = [
|
|
|
157
161
|
BlockType.CUSTOM,
|
|
158
162
|
]
|
|
159
163
|
|
|
160
|
-
BLOCK_TYPE_DIRECTORY_NAME =
|
|
161
|
-
|
|
164
|
+
BLOCK_TYPE_DIRECTORY_NAME = {
|
|
165
|
+
v: f'{v.value}s' for v in BlockType if v not in SINGULAR_FOLDER_BLOCK_TYPES
|
|
166
|
+
}
|
|
162
167
|
|
|
163
168
|
|
|
164
169
|
PIPELINE_TYPE_DISPLAY_NAME_MAPPING = {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
|
-
import yaml
|
|
4
3
|
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Dict, List
|
|
5
|
+
|
|
6
|
+
import yaml
|
|
5
7
|
from jinja2 import Template
|
|
8
|
+
|
|
6
9
|
from mage_ai.data_preparation.models.block import Block
|
|
7
10
|
from mage_ai.data_preparation.models.constants import (
|
|
8
11
|
BLOCK_LANGUAGE_TO_FILE_EXTENSION,
|
|
@@ -10,18 +13,18 @@ from mage_ai.data_preparation.models.constants import (
|
|
|
10
13
|
BlockLanguage,
|
|
11
14
|
BlockType,
|
|
12
15
|
)
|
|
13
|
-
from mage_ai.data_preparation.models.file import File
|
|
14
|
-
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
15
16
|
from mage_ai.data_preparation.models.custom_templates.constants import (
|
|
16
17
|
DIRECTORY_FOR_BLOCK_TEMPLATES,
|
|
17
18
|
METADATA_FILENAME_WITH_EXTENSION,
|
|
18
19
|
)
|
|
19
|
-
from mage_ai.data_preparation.models.custom_templates.utils import
|
|
20
|
-
|
|
20
|
+
from mage_ai.data_preparation.models.custom_templates.utils import (
|
|
21
|
+
custom_templates_directory,
|
|
22
|
+
)
|
|
23
|
+
from mage_ai.data_preparation.models.file import File
|
|
24
|
+
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
21
25
|
from mage_ai.shared.config import BaseConfig
|
|
22
26
|
from mage_ai.shared.hash import merge_dict
|
|
23
27
|
from mage_ai.shared.io import safe_write
|
|
24
|
-
from typing import Dict, List
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
@dataclass
|
|
@@ -34,12 +37,13 @@ class CustomBlockTemplate(BaseConfig):
|
|
|
34
37
|
language: BlockLanguage = None
|
|
35
38
|
name: str = None
|
|
36
39
|
pipeline: Dict = field(default_factory=dict)
|
|
40
|
+
repo_path: str = None
|
|
37
41
|
tags: List = field(default_factory=list)
|
|
38
42
|
template_uuid: str = None
|
|
39
43
|
user: Dict = field(default_factory=dict)
|
|
40
44
|
|
|
41
45
|
@classmethod
|
|
42
|
-
def load(self, template_uuid: str = None, uuid: str = None):
|
|
46
|
+
def load(self, repo_path, template_uuid: str = None, uuid: str = None):
|
|
43
47
|
uuid_use = uuid
|
|
44
48
|
template_uuid_use = template_uuid
|
|
45
49
|
|
|
@@ -55,12 +59,13 @@ class CustomBlockTemplate(BaseConfig):
|
|
|
55
59
|
|
|
56
60
|
try:
|
|
57
61
|
config_path_metadata = os.path.join(
|
|
58
|
-
|
|
62
|
+
repo_path,
|
|
59
63
|
uuid_use,
|
|
60
64
|
METADATA_FILENAME_WITH_EXTENSION,
|
|
61
65
|
)
|
|
62
66
|
custom_template = super().load(config_path_metadata)
|
|
63
67
|
custom_template.template_uuid = template_uuid_use
|
|
68
|
+
custom_template.repo_path = repo_path
|
|
64
69
|
|
|
65
70
|
return custom_template
|
|
66
71
|
except Exception as err:
|
|
@@ -77,7 +82,7 @@ class CustomBlockTemplate(BaseConfig):
|
|
|
77
82
|
@property
|
|
78
83
|
def metadata_file_path(self) -> str:
|
|
79
84
|
return os.path.join(
|
|
80
|
-
|
|
85
|
+
self.repo_path,
|
|
81
86
|
self.uuid,
|
|
82
87
|
METADATA_FILENAME_WITH_EXTENSION,
|
|
83
88
|
)
|
|
@@ -98,7 +103,7 @@ class CustomBlockTemplate(BaseConfig):
|
|
|
98
103
|
return Block.create(
|
|
99
104
|
block_name,
|
|
100
105
|
self.block_type,
|
|
101
|
-
|
|
106
|
+
self.repo_path,
|
|
102
107
|
color=self.color,
|
|
103
108
|
configuration=configuration,
|
|
104
109
|
extension_uuid=extension_uuid,
|
|
@@ -118,7 +123,7 @@ class CustomBlockTemplate(BaseConfig):
|
|
|
118
123
|
return File(
|
|
119
124
|
dir_path=self.uuid,
|
|
120
125
|
filename=filename,
|
|
121
|
-
repo_path=
|
|
126
|
+
repo_path=self.repo_path,
|
|
122
127
|
).content()
|
|
123
128
|
|
|
124
129
|
def render_template(
|
|
@@ -170,8 +175,8 @@ class CustomBlockTemplate(BaseConfig):
|
|
|
170
175
|
filename,
|
|
171
176
|
self.uuid,
|
|
172
177
|
self.content,
|
|
173
|
-
|
|
178
|
+
self.repo_path,
|
|
174
179
|
)
|
|
175
180
|
|
|
176
181
|
def delete(self) -> None:
|
|
177
|
-
shutil.rmtree(os.path.join(
|
|
182
|
+
shutil.rmtree(os.path.join(self.repo_path, self.uuid))
|