mage-ai 0.9.74__py3-none-any.whl → 0.9.76__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/llm_pipeline_wizard.py +6 -4
- mage_ai/ai/openai_client.py +7 -5
- mage_ai/api/policies/PipelineSchedulePolicy.py +1 -0
- mage_ai/api/presenters/PipelineSchedulePresenter.py +11 -2
- mage_ai/api/resources/PipelineScheduleResource.py +11 -3
- mage_ai/api/resources/PipelineTriggerResource.py +3 -1
- mage_ai/api/resources/SessionResource.py +2 -2
- mage_ai/api/resources/SyncResource.py +1 -1
- mage_ai/api/resources/UserResource.py +1 -1
- mage_ai/data_integrations/destinations/constants.py +3 -0
- mage_ai/data_integrations/sources/constants.py +2 -0
- mage_ai/data_preparation/models/block/__init__.py +4 -5
- mage_ai/data_preparation/models/block/dbt/dbt_adapter.py +20 -8
- mage_ai/data_preparation/models/block/dynamic/constants.py +0 -1
- mage_ai/data_preparation/models/block/dynamic/counter.py +1 -3
- mage_ai/data_preparation/models/block/r/__init__.py +16 -5
- mage_ai/data_preparation/models/block/sql/__init__.py +2 -0
- mage_ai/data_preparation/models/block/sql/mssql.py +8 -0
- mage_ai/data_preparation/models/block/sql/utils/shared.py +6 -2
- mage_ai/data_preparation/models/constants.py +2 -1
- mage_ai/data_preparation/models/pipeline.py +5 -0
- mage_ai/data_preparation/templates/constants.py +7 -0
- mage_ai/data_preparation/templates/data_exporters/streaming/elasticsearch.yaml +3 -0
- mage_ai/data_preparation/templates/data_loaders/airtable.py +28 -0
- mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +6 -3
- mage_ai/data_preparation/templates/repo/io_config.yaml +2 -0
- mage_ai/io/airtable.py +104 -0
- mage_ai/io/base.py +30 -1
- mage_ai/io/bigquery.py +36 -0
- mage_ai/io/config.py +5 -0
- mage_ai/io/mssql.py +5 -0
- mage_ai/io/mysql.py +6 -1
- mage_ai/io/oracledb.py +2 -4
- mage_ai/io/postgres.py +38 -19
- mage_ai/io/redshift.py +13 -0
- mage_ai/io/sql.py +1 -0
- mage_ai/io/utils.py +18 -0
- mage_ai/orchestration/db/__init__.py +23 -3
- mage_ai/orchestration/db/models/schedules.py +2 -5
- mage_ai/orchestration/db/models/secrets.py +11 -1
- mage_ai/orchestration/metrics/pipeline_run.py +1 -1
- mage_ai/orchestration/pipeline_scheduler_original.py +4 -5
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +4 -5
- mage_ai/orchestration/utils/distributed_lock.py +8 -1
- mage_ai/server/api/triggers.py +9 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +3 -3
- mage_ai/server/frontend_dist/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/449-5e2253c6aba42557.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-782dd4a6b13e1c42.js +2 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-5db54821a3059c69.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-f65416f6dbe30ad3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-03d9bca3bc5e6088.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-d25d07db166cbb04.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-fa61dc6c1370e6a5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/qR0jauUABqPaFMjUsYeoG/_buildManifest.js +1 -0
- 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/overview.html +6 -6
- mage_ai/server/frontend_dist/manage/pipeline-runs.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 +7 -7
- 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/v2/canvas.html +2 -2
- mage_ai/server/frontend_dist/v2.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-5e2253c6aba42557.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist_base_path_template/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ee5e328aaf51c698.js +2 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist_base_path_template/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist_base_path_template/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-5db54821a3059c69.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-f65416f6dbe30ad3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-03d9bca3bc5e6088.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-d25d07db166cbb04.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-fa61dc6c1370e6a5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist_base_path_template/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist_base_path_template/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-12ad70eb5c31aa92.js → webpack-5f4be622608d9267.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/iCySon3_GCldnbC5U7C-s/_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/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/pipeline-runs.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 +7 -7
- 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/v2/canvas.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/v2.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/server.py +9 -0
- mage_ai/services/teams/config.py +13 -2
- mage_ai/services/teams/teams.py +13 -11
- mage_ai/settings/server.py +2 -0
- mage_ai/shared/constants.py +3 -1
- mage_ai/shared/enum.py +2 -5
- mage_ai/shared/environments.py +27 -3
- mage_ai/streaming/sinks/elasticsearch.py +15 -5
- mage_ai/tests/api/endpoints/test_blocks.py +1 -101
- mage_ai/tests/api/endpoints/test_configuration_options.py +1 -48
- mage_ai/tests/api/endpoints/test_configuration_options_project_platform.py +68 -0
- mage_ai/tests/api/endpoints/test_custom_designs.py +1 -106
- mage_ai/tests/api/endpoints/test_custom_designs_project_platform.py +132 -0
- mage_ai/tests/api/endpoints/test_dbt_blocks.py +111 -0
- mage_ai/tests/api/endpoints/test_file_contents.py +0 -48
- mage_ai/tests/api/endpoints/test_file_contents_with_project_platform.py +66 -0
- mage_ai/tests/api/endpoints/test_pipelines.py +0 -134
- mage_ai/tests/api/endpoints/test_pipelines_with_project_platform.py +143 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +1 -3
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +3 -3
- mage_ai/tests/data_preparation/models/test_block.py +7 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +0 -63
- mage_ai/tests/data_preparation/test_repo_manager_project_platform.py +67 -0
- mage_ai/tests/data_preparation/test_variable_manager.py +0 -51
- mage_ai/tests/data_preparation/test_variable_manager_project_platform.py +41 -0
- mage_ai/tests/io/create_table/test_postgresql.py +27 -0
- mage_ai/tests/orchestration/notification/test_config.py +3 -3
- mage_ai/usage_statistics/logger.py +99 -15
- mage_ai-0.9.76.dist-info/METADATA +393 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.76.dist-info}/RECORD +331 -322
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.76.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-5bdff745074fb350.js +0 -2
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-a5e9d77ed5b50205.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-cd49372ae1702963.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-5212c01a9dc558da.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/pLWT6Sqd09xYpufCVIqnz/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/JQewSAObpbhO0wrdAM6Ng/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-90de19bc03f1484b.js +0 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-a5e9d77ed5b50205.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-cd49372ae1702963.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-5212c01a9dc558da.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
- mage_ai-0.9.74.dist-info/METADATA +0 -544
- /mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js.LICENSE.txt → _app-782dd4a6b13e1c42.js.LICENSE.txt} +0 -0
- /mage_ai/server/frontend_dist/_next/static/{pLWT6Sqd09xYpufCVIqnz → qR0jauUABqPaFMjUsYeoG}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js.LICENSE.txt → _app-ee5e328aaf51c698.js.LICENSE.txt} +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{JQewSAObpbhO0wrdAM6Ng → iCySon3_GCldnbC5U7C-s}/_ssgManifest.js +0 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.76.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.76.dist-info/licenses}/LICENSE +0 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.76.dist-info}/top_level.txt +0 -0
|
@@ -156,16 +156,18 @@ TEMPLATE_CLASSIFICATION_FUNCTION = [
|
|
|
156
156
|
"type": "string",
|
|
157
157
|
"description": "Programming language of the code block. "
|
|
158
158
|
f"Default value is {BlockLanguage.__name__}__python.",
|
|
159
|
-
"enum": [
|
|
160
|
-
|
|
159
|
+
"enum": [
|
|
160
|
+
f"{BlockLanguage.__name__}__{type.name.lower()}"
|
|
161
|
+
for type in BlockLanguage]
|
|
161
162
|
},
|
|
162
163
|
PipelineType.__name__: {
|
|
163
164
|
"type": "string",
|
|
164
165
|
"description": "Type of pipeline to build. Default value is "
|
|
165
166
|
f"{PipelineType.__name__}__python if pipeline type "
|
|
166
167
|
"is not mentioned in the description.",
|
|
167
|
-
"enum": [
|
|
168
|
-
|
|
168
|
+
"enum": [
|
|
169
|
+
f"{PipelineType.__name__}__{type.name.lower()}"
|
|
170
|
+
for type in PipelineType]
|
|
169
171
|
},
|
|
170
172
|
ActionType.__name__: {
|
|
171
173
|
"type": "string",
|
mage_ai/ai/openai_client.py
CHANGED
|
@@ -42,16 +42,18 @@ tools = [
|
|
|
42
42
|
"type": "string",
|
|
43
43
|
"description": "Programming language of the code block. "
|
|
44
44
|
f"Default value is {BlockLanguage.__name__}__python.",
|
|
45
|
-
"enum": [
|
|
46
|
-
|
|
45
|
+
"enum": [
|
|
46
|
+
f"{BlockLanguage.__name__}__{type.name.lower()}"
|
|
47
|
+
for type in BlockLanguage]
|
|
47
48
|
},
|
|
48
49
|
PipelineType.__name__: {
|
|
49
50
|
"type": "string",
|
|
50
51
|
"description": "Type of pipeline to build. Default value is "
|
|
51
52
|
f"{PipelineType.__name__}__python if pipeline type "
|
|
52
53
|
"is not mentioned in the description.",
|
|
53
|
-
"enum": [
|
|
54
|
-
|
|
54
|
+
"enum": [
|
|
55
|
+
f"{PipelineType.__name__}__{type.name.lower()}"
|
|
56
|
+
for type in PipelineType]
|
|
55
57
|
},
|
|
56
58
|
ActionType.__name__: {
|
|
57
59
|
"type": "string",
|
|
@@ -85,7 +87,7 @@ class OpenAIClient(AIClient):
|
|
|
85
87
|
open_ai_config.openai_api_key or os.getenv('OPENAI_API_KEY')
|
|
86
88
|
openai.api_key = openai_api_key
|
|
87
89
|
self.llm = OpenAI(openai_api_key=openai_api_key, temperature=0)
|
|
88
|
-
self.openai_client = OpenAILib()
|
|
90
|
+
self.openai_client = OpenAILib(api_key=openai_api_key)
|
|
89
91
|
|
|
90
92
|
def __chat_completion_request(self, messages):
|
|
91
93
|
try:
|
|
@@ -100,6 +100,7 @@ PipelineSchedulePolicy.allow_read(PipelineSchedulePresenter.default_attributes +
|
|
|
100
100
|
PipelineSchedulePolicy.allow_read(PipelineSchedulePresenter.default_attributes + [
|
|
101
101
|
'event_matchers',
|
|
102
102
|
'next_pipeline_run_date',
|
|
103
|
+
'rotate_token',
|
|
103
104
|
'tags',
|
|
104
105
|
], scopes=[
|
|
105
106
|
OauthScope.CLIENT_PRIVATE,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from mage_ai.api.operations import constants
|
|
2
2
|
from mage_ai.api.presenters.BasePresenter import BasePresenter
|
|
3
|
+
from mage_ai.settings.server import HIDE_API_TRIGGER_TOKEN
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class PipelineSchedulePresenter(BasePresenter):
|
|
@@ -32,8 +33,6 @@ class PipelineSchedulePresenter(BasePresenter):
|
|
|
32
33
|
])
|
|
33
34
|
data['tags'] = sorted([tag.name for tag in self.get_tag_associations])
|
|
34
35
|
data['next_pipeline_run_date'] = self.model.next_execution_date()
|
|
35
|
-
|
|
36
|
-
return data
|
|
37
36
|
elif 'with_runtime_average' == display_format:
|
|
38
37
|
data = self.model.to_dict()
|
|
39
38
|
data['runtime_average'] = self.model.runtime_average()
|
|
@@ -47,6 +46,16 @@ class PipelineSchedulePresenter(BasePresenter):
|
|
|
47
46
|
else:
|
|
48
47
|
data = self.model.to_dict()
|
|
49
48
|
|
|
49
|
+
if display_format == constants.UPDATE:
|
|
50
|
+
rotate_token = kwargs.get(
|
|
51
|
+
'payload', dict(),
|
|
52
|
+
).get(
|
|
53
|
+
'pipeline_schedule', dict(),
|
|
54
|
+
).get('rotate_token')
|
|
55
|
+
else:
|
|
56
|
+
rotate_token = False
|
|
57
|
+
if HIDE_API_TRIGGER_TOKEN and not rotate_token:
|
|
58
|
+
data['token'] = '[API_TOKEN_PLACEHOLDER]'
|
|
50
59
|
return data
|
|
51
60
|
|
|
52
61
|
|
|
@@ -29,7 +29,8 @@ from mage_ai.orchestration.db.models.tags import (
|
|
|
29
29
|
)
|
|
30
30
|
from mage_ai.settings.platform import project_platform_activated
|
|
31
31
|
from mage_ai.settings.repo import get_repo_path
|
|
32
|
-
from mage_ai.
|
|
32
|
+
from mage_ai.settings.server import HIDE_API_TRIGGER_TOKEN
|
|
33
|
+
from mage_ai.shared.hash import ignore_keys, merge_dict
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
class PipelineScheduleResource(DatabaseResource):
|
|
@@ -282,6 +283,7 @@ class PipelineScheduleResource(DatabaseResource):
|
|
|
282
283
|
|
|
283
284
|
@safe_db_query
|
|
284
285
|
def update(self, payload, **kwargs):
|
|
286
|
+
# Update associated event matchers
|
|
285
287
|
arr = payload.pop('event_matchers', None)
|
|
286
288
|
event_matchers = []
|
|
287
289
|
if arr is not None:
|
|
@@ -320,6 +322,7 @@ class PipelineScheduleResource(DatabaseResource):
|
|
|
320
322
|
]
|
|
321
323
|
em.update(pipeline_schedules=ps)
|
|
322
324
|
|
|
325
|
+
# Update associated tags
|
|
323
326
|
tag_names = payload.pop('tags', None)
|
|
324
327
|
if tag_names is not None:
|
|
325
328
|
# 1. Fetch all tag associations
|
|
@@ -408,7 +411,11 @@ class PipelineScheduleResource(DatabaseResource):
|
|
|
408
411
|
|
|
409
412
|
old_name = self.model.name
|
|
410
413
|
|
|
411
|
-
|
|
414
|
+
# Rotate token
|
|
415
|
+
if payload.get('rotate_token'):
|
|
416
|
+
payload['token'] = uuid.uuid4().hex
|
|
417
|
+
|
|
418
|
+
resource = super().update(ignore_keys(payload, ['rotate_token']))
|
|
412
419
|
updated_model = resource.model
|
|
413
420
|
|
|
414
421
|
repo_path = get_repo_path(user=self.current_user)
|
|
@@ -424,9 +431,10 @@ class PipelineScheduleResource(DatabaseResource):
|
|
|
424
431
|
sla=updated_model.sla,
|
|
425
432
|
start_time=updated_model.start_time,
|
|
426
433
|
status=updated_model.status,
|
|
427
|
-
token=updated_model.token,
|
|
428
434
|
variables=updated_model.variables,
|
|
429
435
|
)
|
|
436
|
+
if not HIDE_API_TRIGGER_TOKEN:
|
|
437
|
+
trigger.token = updated_model.token
|
|
430
438
|
|
|
431
439
|
update_only_if_exists = (
|
|
432
440
|
not pipeline.should_save_trigger_in_code_automatically()
|
|
@@ -8,6 +8,7 @@ from mage_ai.data_preparation.models.triggers import (
|
|
|
8
8
|
from mage_ai.orchestration.db import safe_db_query
|
|
9
9
|
from mage_ai.orchestration.db.models.schedules import PipelineSchedule
|
|
10
10
|
from mage_ai.settings.repo import get_repo_path
|
|
11
|
+
from mage_ai.settings.server import HIDE_API_TRIGGER_TOKEN
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
class PipelineTriggerResource(GenericResource):
|
|
@@ -50,9 +51,10 @@ class PipelineTriggerResource(GenericResource):
|
|
|
50
51
|
sla=pipeline_schedule.sla,
|
|
51
52
|
start_time=pipeline_schedule.start_time,
|
|
52
53
|
status=pipeline_schedule.status,
|
|
53
|
-
token=pipeline_schedule.token,
|
|
54
54
|
variables=pipeline_schedule.variables,
|
|
55
55
|
)
|
|
56
|
+
if not HIDE_API_TRIGGER_TOKEN:
|
|
57
|
+
trigger.token = pipeline_schedule.token
|
|
56
58
|
else:
|
|
57
59
|
trigger = Trigger(**payload)
|
|
58
60
|
|
|
@@ -6,7 +6,7 @@ from mage_ai.authentication.ldap import new_ldap_connection
|
|
|
6
6
|
from mage_ai.authentication.oauth2 import encode_token, generate_access_token
|
|
7
7
|
from mage_ai.authentication.passwords import verify_password
|
|
8
8
|
from mage_ai.authentication.providers.constants import NAME_TO_PROVIDER
|
|
9
|
-
from mage_ai.orchestration.db import safe_db_query
|
|
9
|
+
from mage_ai.orchestration.db import safe_db_query, safe_db_query_async
|
|
10
10
|
from mage_ai.orchestration.db.models.oauth import Role, User
|
|
11
11
|
from mage_ai.settings import (
|
|
12
12
|
AUTHENTICATION_MODE,
|
|
@@ -20,7 +20,7 @@ from mage_ai.usage_statistics.logger import UsageStatisticLogger
|
|
|
20
20
|
|
|
21
21
|
class SessionResource(BaseResource):
|
|
22
22
|
@classmethod
|
|
23
|
-
@
|
|
23
|
+
@safe_db_query_async
|
|
24
24
|
async def create(self, payload, _, **kwargs):
|
|
25
25
|
email = payload.get('email')
|
|
26
26
|
password = payload.get('password')
|
|
@@ -163,7 +163,7 @@ class SyncResource(GenericResource):
|
|
|
163
163
|
access_token = user_payload.pop('access_token', None)
|
|
164
164
|
if access_token:
|
|
165
165
|
secret_name = get_access_token_secret_name(user=user)
|
|
166
|
-
secret = Secret.
|
|
166
|
+
secret = Secret.repo_query.filter(Secret.name == secret_name).one_or_none()
|
|
167
167
|
if secret:
|
|
168
168
|
secret.delete()
|
|
169
169
|
create_secret(secret_name, access_token, repo_name=repo_name)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
DESTINATIONS = [
|
|
2
|
+
dict(name='Airtable'),
|
|
2
3
|
dict(name='Amazon S3'),
|
|
3
4
|
dict(name='BigQuery'),
|
|
4
5
|
dict(name='Clickhouse'),
|
|
5
6
|
dict(name='Delta Lake Azure'),
|
|
6
7
|
dict(name='Delta Lake S3'),
|
|
8
|
+
dict(name='Doris'),
|
|
7
9
|
dict(name='Elasticsearch'),
|
|
8
10
|
dict(name='Google Cloud Storage'),
|
|
9
11
|
dict(name='Kafka'),
|
|
@@ -20,5 +22,6 @@ DESTINATIONS = [
|
|
|
20
22
|
dict(name='Redshift'),
|
|
21
23
|
dict(name='Salesforce'),
|
|
22
24
|
dict(name='Snowflake'),
|
|
25
|
+
dict(name='Teradata'),
|
|
23
26
|
dict(name='Trino'),
|
|
24
27
|
]
|
|
@@ -3,6 +3,7 @@ from mage_ai.shared.hash import index_by
|
|
|
3
3
|
|
|
4
4
|
SQL_SOURCES = [
|
|
5
5
|
dict(name='BigQuery'),
|
|
6
|
+
dict(name='Doris'),
|
|
6
7
|
dict(
|
|
7
8
|
name='Microsoft SQL Server',
|
|
8
9
|
uuid='mssql',
|
|
@@ -53,6 +54,7 @@ SOURCES = sorted([
|
|
|
53
54
|
dict(name='Sftp'),
|
|
54
55
|
dict(name='Stripe'),
|
|
55
56
|
dict(name='Tableau'),
|
|
57
|
+
dict(name='Teradata'),
|
|
56
58
|
dict(name='Twitter Ads'),
|
|
57
59
|
dict(name='Zendesk'),
|
|
58
60
|
] + SQL_SOURCES, key=lambda x: x['name'])
|
|
@@ -878,7 +878,7 @@ class Block(
|
|
|
878
878
|
relative_path: bool = False,
|
|
879
879
|
) -> str:
|
|
880
880
|
file_extension = BLOCK_LANGUAGE_TO_FILE_EXTENSION[language]
|
|
881
|
-
block_directory = block_type
|
|
881
|
+
block_directory = f'{block_type}s' if block_type != BlockType.CUSTOM else block_type
|
|
882
882
|
|
|
883
883
|
parts = []
|
|
884
884
|
if not relative_path:
|
|
@@ -1010,7 +1010,7 @@ class Block(
|
|
|
1010
1010
|
self,
|
|
1011
1011
|
content: str,
|
|
1012
1012
|
) -> str:
|
|
1013
|
-
return '@
|
|
1013
|
+
return f'@{self.type}\n{content}'
|
|
1014
1014
|
|
|
1015
1015
|
@classmethod
|
|
1016
1016
|
def after_create(cls, block: 'Block', **kwargs) -> None:
|
|
@@ -1199,7 +1199,7 @@ class Block(
|
|
|
1199
1199
|
|
|
1200
1200
|
@classmethod
|
|
1201
1201
|
def file_directory_name(self, block_type: BlockType) -> str:
|
|
1202
|
-
return block_type
|
|
1202
|
+
return f'{block_type}s' if block_type != BlockType.CUSTOM else block_type
|
|
1203
1203
|
|
|
1204
1204
|
@classmethod
|
|
1205
1205
|
def block_type_from_path(
|
|
@@ -1218,7 +1218,7 @@ class Block(
|
|
|
1218
1218
|
for block_type in BlockType:
|
|
1219
1219
|
if BlockType.CUSTOM == block_type and dir_name == block_type:
|
|
1220
1220
|
return BlockType.CUSTOM
|
|
1221
|
-
elif dir_name == block_type
|
|
1221
|
+
elif dir_name == f'{block_type}s':
|
|
1222
1222
|
return block_type
|
|
1223
1223
|
|
|
1224
1224
|
@classmethod
|
|
@@ -3941,7 +3941,6 @@ class Block(
|
|
|
3941
3941
|
for v in b.output_variables(execution_partition=execution_partition):
|
|
3942
3942
|
objs.append(
|
|
3943
3943
|
self.get_variable_object(
|
|
3944
|
-
self.pipeline_uuid,
|
|
3945
3944
|
b.uuid,
|
|
3946
3945
|
v,
|
|
3947
3946
|
partition=execution_partition,
|
|
@@ -5,7 +5,9 @@ from typing import Any, Dict, Optional, Tuple, Union
|
|
|
5
5
|
|
|
6
6
|
import dbt.flags as flags
|
|
7
7
|
import pandas as pd
|
|
8
|
-
from dbt.adapters.base import BaseRelation
|
|
8
|
+
from dbt.adapters.base.relation import BaseRelation
|
|
9
|
+
from dbt.adapters.contracts.connection import AdapterResponse, Credentials
|
|
10
|
+
from dbt.adapters.contracts.relation import RelationType
|
|
9
11
|
from dbt.adapters.factory import (
|
|
10
12
|
Adapter,
|
|
11
13
|
cleanup_connections,
|
|
@@ -13,10 +15,10 @@ from dbt.adapters.factory import (
|
|
|
13
15
|
register_adapter,
|
|
14
16
|
reset_adapters,
|
|
15
17
|
)
|
|
16
|
-
from dbt.config.
|
|
18
|
+
from dbt.config.project import read_project_flags
|
|
17
19
|
from dbt.config.runtime import RuntimeConfig
|
|
18
|
-
from dbt.
|
|
19
|
-
from dbt.
|
|
20
|
+
from dbt.context.providers import generate_runtime_macro_context
|
|
21
|
+
from dbt.mp_context import get_mp_context
|
|
20
22
|
|
|
21
23
|
from mage_ai.data_preparation.models.block.dbt.profiles import Profiles
|
|
22
24
|
from mage_ai.shared.environments import is_debug
|
|
@@ -79,7 +81,11 @@ class DBTAdapter:
|
|
|
79
81
|
# remove interpolated profiles.yml
|
|
80
82
|
self.__profiles.clean()
|
|
81
83
|
|
|
82
|
-
def execute(
|
|
84
|
+
def execute(
|
|
85
|
+
self,
|
|
86
|
+
sql: str,
|
|
87
|
+
fetch: bool = False
|
|
88
|
+
) -> Tuple[AdapterResponse, pd.DataFrame]:
|
|
83
89
|
"""
|
|
84
90
|
Executes any sql statement using the dbt adapter.
|
|
85
91
|
|
|
@@ -135,6 +141,8 @@ class DBTAdapter:
|
|
|
135
141
|
package
|
|
136
142
|
)
|
|
137
143
|
|
|
144
|
+
self.__adapter.set_macro_resolver(manifest)
|
|
145
|
+
|
|
138
146
|
# create a context for the macro (e.g. downstream macros)
|
|
139
147
|
from dbt.context.providers import generate_runtime_macro_context
|
|
140
148
|
macro_context = generate_runtime_macro_context(
|
|
@@ -203,7 +211,7 @@ class DBTAdapter:
|
|
|
203
211
|
# set dbt flags
|
|
204
212
|
# Need to add profiles.yml file
|
|
205
213
|
try:
|
|
206
|
-
user_config =
|
|
214
|
+
user_config = read_project_flags(self.project_path, profiles_path)
|
|
207
215
|
except Exception as err:
|
|
208
216
|
print(f'[ERROR] DBTAdapter.open: {err}.')
|
|
209
217
|
|
|
@@ -211,7 +219,10 @@ class DBTAdapter:
|
|
|
211
219
|
not profiles_path.endswith('profiles.yml'):
|
|
212
220
|
|
|
213
221
|
try:
|
|
214
|
-
user_config =
|
|
222
|
+
user_config = read_project_flags(
|
|
223
|
+
self.project_path,
|
|
224
|
+
os.path.join(profiles_path, 'profiles.yml')
|
|
225
|
+
)
|
|
215
226
|
except Exception as err2:
|
|
216
227
|
print(f'[ERROR] DBTAdapter.open: {err2}.')
|
|
217
228
|
raise err
|
|
@@ -227,9 +238,10 @@ class DBTAdapter:
|
|
|
227
238
|
config = RuntimeConfig.from_args(adapter_config)
|
|
228
239
|
reset_adapters()
|
|
229
240
|
# register the correct adapter from config
|
|
230
|
-
register_adapter(config)
|
|
241
|
+
register_adapter(config, mp_context=get_mp_context())
|
|
231
242
|
# load the adapter
|
|
232
243
|
self.__adapter = get_adapter(config)
|
|
244
|
+
self.__adapter.set_macro_context_generator(generate_runtime_macro_context)
|
|
233
245
|
# connect
|
|
234
246
|
self.__adapter.acquire_connection('mage_dbt_adapter_' + uuid.uuid4().hex)
|
|
235
247
|
return self
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CHILD_DATA_VARIABLE_UUID = 'output_0'
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
from typing import Any, Iterable, List, Optional, Sequence
|
|
2
2
|
|
|
3
3
|
from mage_ai.data.tabular.reader import read_metadata
|
|
4
|
-
from mage_ai.data_preparation.models.block.dynamic.constants import (
|
|
5
|
-
CHILD_DATA_VARIABLE_UUID,
|
|
6
|
-
)
|
|
7
4
|
from mage_ai.data_preparation.models.block.dynamic.utils import (
|
|
8
5
|
is_dynamic_block,
|
|
9
6
|
is_dynamic_block_child,
|
|
10
7
|
should_reduce_output,
|
|
11
8
|
)
|
|
9
|
+
from mage_ai.data_preparation.models.constants import CHILD_DATA_VARIABLE_UUID
|
|
12
10
|
from mage_ai.data_preparation.models.variables.cache import VariableAggregateCache
|
|
13
11
|
from mage_ai.data_preparation.models.variables.constants import (
|
|
14
12
|
VariableAggregateDataType,
|
|
@@ -8,7 +8,10 @@ import pandas as pd
|
|
|
8
8
|
import simplejson
|
|
9
9
|
|
|
10
10
|
from mage_ai.data_preparation.models.block import Block
|
|
11
|
-
from mage_ai.data_preparation.models.constants import
|
|
11
|
+
from mage_ai.data_preparation.models.constants import (
|
|
12
|
+
CHILD_DATA_VARIABLE_UUID,
|
|
13
|
+
BlockType,
|
|
14
|
+
)
|
|
12
15
|
from mage_ai.data_preparation.models.variables.constants import (
|
|
13
16
|
DATAFRAME_CSV_FILE,
|
|
14
17
|
VariableType,
|
|
@@ -81,7 +84,10 @@ def execute_r_code(
|
|
|
81
84
|
|
|
82
85
|
if len(output_variable_objects) > 0:
|
|
83
86
|
df = pd.read_csv(
|
|
84
|
-
os.path.join(
|
|
87
|
+
os.path.join(
|
|
88
|
+
output_variable_objects[0].variable_path,
|
|
89
|
+
DATAFRAME_CSV_FILE
|
|
90
|
+
)
|
|
85
91
|
)
|
|
86
92
|
else:
|
|
87
93
|
df = None
|
|
@@ -129,14 +135,19 @@ def __render_r_script(
|
|
|
129
135
|
raise Exception(
|
|
130
136
|
f"Block execution for {block.type} with R language is not supported.",
|
|
131
137
|
)
|
|
132
|
-
template = template_env.get_template(
|
|
138
|
+
template = template_env.get_template(
|
|
139
|
+
BLOCK_TYPE_TO_EXECUTION_TEMPLATE[block.type]
|
|
140
|
+
)
|
|
133
141
|
|
|
134
142
|
output_variable_object = block.variable_object(
|
|
135
|
-
|
|
143
|
+
CHILD_DATA_VARIABLE_UUID,
|
|
136
144
|
execution_partition=execution_partition,
|
|
137
145
|
)
|
|
138
146
|
os.makedirs(output_variable_object.variable_path, exist_ok=True)
|
|
139
|
-
output_path = os.path.join(
|
|
147
|
+
output_path = os.path.join(
|
|
148
|
+
output_variable_object.variable_path,
|
|
149
|
+
DATAFRAME_CSV_FILE
|
|
150
|
+
)
|
|
140
151
|
|
|
141
152
|
global_vars_str = __render_global_vars(global_vars=global_vars)
|
|
142
153
|
|
|
@@ -150,6 +150,7 @@ def execute_sql_code(
|
|
|
150
150
|
interpolate_vars_options = dict(
|
|
151
151
|
block=block,
|
|
152
152
|
dynamic_block_index=dynamic_block_index,
|
|
153
|
+
execution_partition=execution_partition,
|
|
153
154
|
global_vars=global_vars,
|
|
154
155
|
)
|
|
155
156
|
|
|
@@ -368,6 +369,7 @@ def execute_sql_code(
|
|
|
368
369
|
loader,
|
|
369
370
|
block,
|
|
370
371
|
query_string,
|
|
372
|
+
disable_query_preprocessing=disable_query_preprocessing,
|
|
371
373
|
configuration=configuration,
|
|
372
374
|
should_query=should_query,
|
|
373
375
|
)
|
|
@@ -67,9 +67,17 @@ def execute_raw_sql(
|
|
|
67
67
|
query_string: str,
|
|
68
68
|
configuration: Dict = None,
|
|
69
69
|
should_query: bool = False,
|
|
70
|
+
disable_query_preprocessing: bool = False,
|
|
70
71
|
) -> List[Any]:
|
|
71
72
|
if configuration is None:
|
|
72
73
|
configuration = {}
|
|
74
|
+
|
|
75
|
+
if disable_query_preprocessing:
|
|
76
|
+
return loader.execute_query_raw(
|
|
77
|
+
query_string,
|
|
78
|
+
configuration=configuration,
|
|
79
|
+
)
|
|
80
|
+
|
|
73
81
|
queries = []
|
|
74
82
|
fetch_query_at_indexes = []
|
|
75
83
|
|
|
@@ -232,7 +232,8 @@ def interpolate_vars(
|
|
|
232
232
|
content: str,
|
|
233
233
|
global_vars: Dict = None,
|
|
234
234
|
block=None,
|
|
235
|
-
dynamic_block_index: int = None
|
|
235
|
+
dynamic_block_index: int = None,
|
|
236
|
+
execution_partition: str = None,
|
|
236
237
|
) -> str :
|
|
237
238
|
if not content:
|
|
238
239
|
return content
|
|
@@ -241,7 +242,10 @@ def interpolate_vars(
|
|
|
241
242
|
|
|
242
243
|
if block:
|
|
243
244
|
content = block.interpolate_content(
|
|
244
|
-
content,
|
|
245
|
+
content,
|
|
246
|
+
variables=global_vars,
|
|
247
|
+
dynamic_block_index=dynamic_block_index,
|
|
248
|
+
execution_partition=execution_partition,
|
|
245
249
|
)
|
|
246
250
|
|
|
247
251
|
return Template(
|
|
@@ -15,7 +15,7 @@ DATA_INTEGRATION_CATALOG_FILE = 'data_integration_catalog.json'
|
|
|
15
15
|
DATAFRAME_ANALYSIS_MAX_COLUMNS = 100
|
|
16
16
|
DATAFRAME_ANALYSIS_MAX_ROWS = 100_000
|
|
17
17
|
DATAFRAME_SAMPLE_COUNT = 1000
|
|
18
|
-
DATAFRAME_SAMPLE_COUNT_PREVIEW = 10
|
|
18
|
+
DATAFRAME_SAMPLE_COUNT_PREVIEW = int(os.getenv('DATAFRAME_SAMPLE_COUNT_PREVIEW', 10) or 10)
|
|
19
19
|
DATAFRAME_SAMPLE_MAX_COLUMNS = 1000
|
|
20
20
|
DYNAMIC_CHILD_BLOCK_SAMPLE_COUNT_PREVIEW = 10
|
|
21
21
|
LOGS_SUBDIR = '.logs'
|
|
@@ -27,6 +27,7 @@ PIPELINES_FOLDER = 'pipelines'
|
|
|
27
27
|
PREFERENCES_FILE = '.preferences.yaml'
|
|
28
28
|
REPO_CONFIG_FILE = 'metadata.yaml'
|
|
29
29
|
VARIABLE_DIR = '.variables'
|
|
30
|
+
CHILD_DATA_VARIABLE_UUID = 'output_0'
|
|
30
31
|
|
|
31
32
|
PIPELINE_RUN_STATUS_LAST_RUN_FAILED = 'last_run_failed'
|
|
32
33
|
|
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
import os
|
|
5
5
|
import shutil
|
|
6
6
|
import tempfile
|
|
7
|
+
import time
|
|
7
8
|
import zipfile
|
|
8
9
|
from datetime import datetime, timezone
|
|
9
10
|
from io import BytesIO
|
|
@@ -2328,6 +2329,10 @@ class Pipeline:
|
|
|
2328
2329
|
extension_uuid: str = None,
|
|
2329
2330
|
widget: bool = False,
|
|
2330
2331
|
):
|
|
2332
|
+
# Introduce a small delay to prevent multiple changes from generating
|
|
2333
|
+
# identical timestamps for the pipeline YAML file
|
|
2334
|
+
time.sleep(0.0005)
|
|
2335
|
+
|
|
2331
2336
|
blocks_current = sorted([b.uuid for b in self.blocks_by_uuid.values()])
|
|
2332
2337
|
|
|
2333
2338
|
if block_uuid is not None:
|
|
@@ -19,6 +19,13 @@ GROUP_ROW_ACTIONS = 'Row actions'
|
|
|
19
19
|
GROUP_SHIFT = 'Shift'
|
|
20
20
|
|
|
21
21
|
TEMPLATES = [
|
|
22
|
+
dict(
|
|
23
|
+
block_type=BlockType.DATA_LOADER,
|
|
24
|
+
description='Load a Table from Airtable App.',
|
|
25
|
+
language=BlockLanguage.PYTHON,
|
|
26
|
+
name='Airtable',
|
|
27
|
+
path='data_loaders/airtable.py',
|
|
28
|
+
),
|
|
22
29
|
dict(
|
|
23
30
|
block_type=BlockType.DATA_LOADER,
|
|
24
31
|
description='Load a Delta Table from Amazon S3.',
|
|
@@ -2,6 +2,9 @@ connector_type: elasticsearch
|
|
|
2
2
|
host: http://localhost
|
|
3
3
|
index_name: elastic_index
|
|
4
4
|
api_key: api_key_for_elastic_search
|
|
5
|
+
# # When using Data streams this must be set to create as they are Append-only indexes
|
|
6
|
+
# _op_type: None / index, create or update
|
|
7
|
+
# _source: None (Default '_doc') / Specify the source field
|
|
5
8
|
# # Whether to verify SSL certificates to authenticate.
|
|
6
9
|
# verify_certs: true
|
|
7
10
|
# ca_cert: "certificate.cert"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% extends "data_loaders/default.jinja" %}
|
|
2
|
+
{% block imports %}
|
|
3
|
+
from mage_ai.settings.repo import get_repo_path
|
|
4
|
+
from mage_ai.io.config import ConfigFileLoader
|
|
5
|
+
from mage_ai.io.airtable import Airtable
|
|
6
|
+
from os import path
|
|
7
|
+
{{ super() -}}
|
|
8
|
+
{% endblock %}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
{% block content %}
|
|
12
|
+
@data_loader
|
|
13
|
+
def load_data_from_airtable(*args, **kwargs):
|
|
14
|
+
"""
|
|
15
|
+
Template for loading data from Airtable.
|
|
16
|
+
Specify your configuration settings in 'io_config.yaml'.
|
|
17
|
+
"""
|
|
18
|
+
config_path = path.join(get_repo_path(), 'io_config.yaml')
|
|
19
|
+
config_profile = 'default'
|
|
20
|
+
|
|
21
|
+
base_id = 'your_base_id'
|
|
22
|
+
table_name = 'your_table_name'
|
|
23
|
+
|
|
24
|
+
return Airtable.with_config(ConfigFileLoader(config_path, config_profile)).load(
|
|
25
|
+
base_id=base_id,
|
|
26
|
+
table_name=table_name
|
|
27
|
+
)
|
|
28
|
+
{% endblock %}
|
|
@@ -17,9 +17,12 @@ timeout: 5
|
|
|
17
17
|
|
|
18
18
|
# Optional: TLS configuration
|
|
19
19
|
use_tls: false
|
|
20
|
-
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
|
|
21
|
+
# Optional: SSL configuration
|
|
22
|
+
# ssl_config:
|
|
23
|
+
# cafile: "path/to/ca.pem"
|
|
24
|
+
# certfile: "path/to/client-cert.pem"
|
|
25
|
+
# keyfile: "path/to/client-key.pem"
|
|
23
26
|
|
|
24
27
|
# Optional: NKEY seed string
|
|
25
28
|
# nkeys_seed_str: "SUAPAEYJQOQHJ4"
|
|
@@ -11,6 +11,8 @@ default:
|
|
|
11
11
|
ALGOLIA_APP_ID: app_id
|
|
12
12
|
ALGOLIA_API_KEY: api_key
|
|
13
13
|
ALGOLIA_INDEX_NAME: index_name
|
|
14
|
+
# Airtable
|
|
15
|
+
AIRTABLE_ACCESS_TOKEN: token
|
|
14
16
|
# Azure
|
|
15
17
|
AZURE_CLIENT_ID: "{{ env_var('AZURE_CLIENT_ID') }}"
|
|
16
18
|
AZURE_CLIENT_SECRET: "{{ env_var('AZURE_CLIENT_SECRET') }}"
|