mage-ai 0.8.38__py3-none-any.whl → 0.8.40__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/data_preparation/models/pipeline.py +13 -12
- mage_ai/io/base.py +2 -2
- mage_ai/io/constants.py +3 -0
- mage_ai/io/export_utils.py +14 -1
- mage_ai/io/mssql.py +5 -2
- mage_ai/io/mysql.py +7 -3
- mage_ai/io/postgres.py +64 -21
- mage_ai/io/sql.py +35 -6
- mage_ai/io/trino.py +7 -3
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/{R_cV5sAcMT3qDXIKAGGPe → UYQNglbviUz843DEKVYAI}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5141-ddf4ba0a362d6f34.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-aaf065c2c2a70e6e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-6c0ea500b3bc6b61.js +1 -0
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/server.py +2 -14
- mage_ai/server/terminal_server.py +65 -0
- {mage_ai-0.8.38.dist-info → mage_ai-0.8.40.dist-info}/METADATA +1 -1
- {mage_ai-0.8.38.dist-info → mage_ai-0.8.40.dist-info}/RECORD +52 -51
- mage_ai/server/frontend_dist/_next/static/chunks/5141-2ae9eae00ec2cdfa.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6d04570af5494767.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-4c9ad80f8f9d1074.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{R_cV5sAcMT3qDXIKAGGPe → UYQNglbviUz843DEKVYAI}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{R_cV5sAcMT3qDXIKAGGPe → UYQNglbviUz843DEKVYAI}/_ssgManifest.js +0 -0
- {mage_ai-0.8.38.dist-info → mage_ai-0.8.40.dist-info}/LICENSE +0 -0
- {mage_ai-0.8.38.dist-info → mage_ai-0.8.40.dist-info}/WHEEL +0 -0
- {mage_ai-0.8.38.dist-info → mage_ai-0.8.40.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.8.38.dist-info → mage_ai-0.8.40.dist-info}/top_level.txt +0 -0
|
@@ -1137,20 +1137,21 @@ class Pipeline:
|
|
|
1137
1137
|
async with aiofiles.open(test_path, mode='w') as fp:
|
|
1138
1138
|
await fp.write(content)
|
|
1139
1139
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1140
|
+
if os.path.isfile(test_path):
|
|
1141
|
+
success = True
|
|
1142
|
+
with open(test_path, mode='r') as fp:
|
|
1143
|
+
try:
|
|
1144
|
+
yaml.full_load(fp)
|
|
1145
|
+
except yaml.scanner.ScannerError:
|
|
1146
|
+
success = False
|
|
1146
1147
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1148
|
+
try:
|
|
1149
|
+
os.remove(test_path)
|
|
1150
|
+
except Exception as err:
|
|
1151
|
+
print(err)
|
|
1151
1152
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1153
|
+
if not success:
|
|
1154
|
+
raise Exception('Invalid pipeline metadata.yaml content, please try saving again.')
|
|
1154
1155
|
|
|
1155
1156
|
await safe_write_async(self.config_path, content)
|
|
1156
1157
|
|
mage_ai/io/base.py
CHANGED
|
@@ -275,9 +275,9 @@ class BaseSQLDatabase(BaseIO):
|
|
|
275
275
|
"""
|
|
276
276
|
return query_string.strip(' \n\t')
|
|
277
277
|
|
|
278
|
-
def _clean_column_name(self, column_name: str) -> str:
|
|
278
|
+
def _clean_column_name(self, column_name: str, allow_reserved_words: bool = False) -> str:
|
|
279
279
|
col_new = re.sub(r'\W', '_', column_name.lower())
|
|
280
|
-
if col_new.upper() in SQL_RESERVED_WORDS:
|
|
280
|
+
if not allow_reserved_words and col_new.upper() in SQL_RESERVED_WORDS:
|
|
281
281
|
col_new = f'_{col_new}'
|
|
282
282
|
return col_new
|
|
283
283
|
|
mage_ai/io/constants.py
CHANGED
mage_ai/io/export_utils.py
CHANGED
|
@@ -2,7 +2,7 @@ from enum import Enum
|
|
|
2
2
|
from mage_ai.shared.utils import clean_name
|
|
3
3
|
from pandas import DataFrame, Series
|
|
4
4
|
from pandas.api.types import infer_dtype
|
|
5
|
-
from typing import Callable, Dict, Mapping
|
|
5
|
+
from typing import Callable, Dict, List, Mapping
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
Utilities for exporting Python data frames to external databases.
|
|
@@ -31,6 +31,7 @@ class PandasTypes(str, Enum):
|
|
|
31
31
|
DATETIME64 = 'datetime64'
|
|
32
32
|
DECIMAL = 'decimal'
|
|
33
33
|
INTEGER = 'integer'
|
|
34
|
+
INT64 = 'int64'
|
|
34
35
|
EMPTY = 'empty'
|
|
35
36
|
FLOATING = 'floating'
|
|
36
37
|
MIXED = 'mixed'
|
|
@@ -101,6 +102,7 @@ def gen_table_creation_query(
|
|
|
101
102
|
dtypes: Mapping[str, str],
|
|
102
103
|
schema_name: str,
|
|
103
104
|
table_name: str,
|
|
105
|
+
unique_constraints: List[str] = [],
|
|
104
106
|
) -> str:
|
|
105
107
|
"""
|
|
106
108
|
Generates a database table creation query from a data frame.
|
|
@@ -123,4 +125,15 @@ def gen_table_creation_query(
|
|
|
123
125
|
else:
|
|
124
126
|
full_table_name = table_name
|
|
125
127
|
|
|
128
|
+
if unique_constraints:
|
|
129
|
+
unique_constraints_clean = [clean_name(col) for col in unique_constraints]
|
|
130
|
+
unique_constraints_escaped = [f'"{col}"'
|
|
131
|
+
for col in unique_constraints_clean]
|
|
132
|
+
index_name = '_'.join([
|
|
133
|
+
clean_name(full_table_name),
|
|
134
|
+
] + unique_constraints_clean)
|
|
135
|
+
index_name = f'unique{index_name}'[:64]
|
|
136
|
+
query.append(
|
|
137
|
+
f"CONSTRAINT {index_name} UNIQUE ({', '.join(unique_constraints_escaped)})",
|
|
138
|
+
)
|
|
126
139
|
return f'CREATE TABLE {full_table_name} (' + ','.join(query) + ');'
|
mage_ai/io/mssql.py
CHANGED
|
@@ -3,7 +3,7 @@ from mage_ai.io.export_utils import PandasTypes
|
|
|
3
3
|
from mage_ai.io.base import QUERY_ROW_LIMIT
|
|
4
4
|
from mage_ai.io.sql import BaseSQL
|
|
5
5
|
from pandas import DataFrame, Series
|
|
6
|
-
from typing import Any, IO, Union
|
|
6
|
+
from typing import Any, IO, List, Union
|
|
7
7
|
import json
|
|
8
8
|
import numpy as np
|
|
9
9
|
import pyodbc
|
|
@@ -87,8 +87,11 @@ class MSSQL(BaseSQL):
|
|
|
87
87
|
self,
|
|
88
88
|
cursor: Any,
|
|
89
89
|
df: DataFrame,
|
|
90
|
+
db_dtypes: List[str],
|
|
91
|
+
dtypes: List[str],
|
|
90
92
|
full_table_name: str,
|
|
91
|
-
buffer: Union[IO, None] = None
|
|
93
|
+
buffer: Union[IO, None] = None,
|
|
94
|
+
**kwargs,
|
|
92
95
|
) -> None:
|
|
93
96
|
values_placeholder = ', '.join(["?" for i in range(len(df.columns))])
|
|
94
97
|
values = []
|
mage_ai/io/mysql.py
CHANGED
|
@@ -5,7 +5,7 @@ from mage_ai.shared.utils import clean_name
|
|
|
5
5
|
from mysql.connector import connect
|
|
6
6
|
from mysql.connector.cursor import MySQLCursor
|
|
7
7
|
from pandas import DataFrame, Series
|
|
8
|
-
from typing import IO, Mapping, Union
|
|
8
|
+
from typing import IO, List, Mapping, Union
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
11
|
|
|
@@ -47,7 +47,8 @@ class MySQL(BaseSQL):
|
|
|
47
47
|
self,
|
|
48
48
|
dtypes: Mapping[str, str],
|
|
49
49
|
schema_name: str,
|
|
50
|
-
table_name: str
|
|
50
|
+
table_name: str,
|
|
51
|
+
unique_constraints: List[str] = [],
|
|
51
52
|
) -> str:
|
|
52
53
|
query = []
|
|
53
54
|
for cname in dtypes:
|
|
@@ -73,8 +74,11 @@ class MySQL(BaseSQL):
|
|
|
73
74
|
self,
|
|
74
75
|
cursor: MySQLCursor,
|
|
75
76
|
df: DataFrame,
|
|
77
|
+
db_dtypes: List[str],
|
|
78
|
+
dtypes: List[str],
|
|
76
79
|
full_table_name: str,
|
|
77
|
-
buffer: Union[IO, None] = None
|
|
80
|
+
buffer: Union[IO, None] = None,
|
|
81
|
+
**kwargs,
|
|
78
82
|
) -> None:
|
|
79
83
|
values_placeholder = ', '.join(["%s" for i in range(len(df.columns))])
|
|
80
84
|
values = []
|
mage_ai/io/postgres.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from mage_ai.io.config import BaseConfigLoader, ConfigKey
|
|
2
|
+
from mage_ai.io.constants import UNIQUE_CONFLICT_METHOD_UPDATE
|
|
2
3
|
from mage_ai.io.export_utils import BadConversionError, PandasTypes
|
|
3
4
|
from mage_ai.io.sql import BaseSQL
|
|
4
5
|
from mage_ai.shared.parsers import encode_complex
|
|
@@ -6,12 +7,21 @@ from mage_ai.shared.utils import is_port_in_use
|
|
|
6
7
|
from pandas import DataFrame, Series
|
|
7
8
|
from psycopg2 import connect, _psycopg
|
|
8
9
|
from sshtunnel import SSHTunnelForwarder
|
|
9
|
-
from typing import
|
|
10
|
+
from typing import IO, List, Union
|
|
10
11
|
import numpy as np
|
|
11
12
|
import pandas as pd
|
|
12
13
|
import simplejson
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
JSON_SERIALIZABLE_TYPES = frozenset([
|
|
17
|
+
PandasTypes.DATE,
|
|
18
|
+
PandasTypes.DATETIME,
|
|
19
|
+
PandasTypes.DATETIME64,
|
|
20
|
+
PandasTypes.OBJECT,
|
|
21
|
+
PandasTypes.TIME,
|
|
22
|
+
])
|
|
23
|
+
|
|
24
|
+
|
|
15
25
|
class Postgres(BaseSQL):
|
|
16
26
|
"""
|
|
17
27
|
Handles data transfer between a PostgreSQL database and the Mage app.
|
|
@@ -159,9 +169,9 @@ class Postgres(BaseSQL):
|
|
|
159
169
|
column_type = None
|
|
160
170
|
|
|
161
171
|
if len(values) >= 1:
|
|
162
|
-
value = values[0]
|
|
163
172
|
column_type = 'JSONB'
|
|
164
173
|
|
|
174
|
+
value = values[0]
|
|
165
175
|
if type(value) is list:
|
|
166
176
|
if len(value) >= 1:
|
|
167
177
|
item = value[0]
|
|
@@ -204,7 +214,7 @@ class Postgres(BaseSQL):
|
|
|
204
214
|
return 'bytea'
|
|
205
215
|
elif dtype in (PandasTypes.FLOATING, PandasTypes.DECIMAL, PandasTypes.MIXED_INTEGER_FLOAT):
|
|
206
216
|
return 'double precision'
|
|
207
|
-
elif dtype == PandasTypes.INTEGER:
|
|
217
|
+
elif dtype == PandasTypes.INTEGER or dtype == PandasTypes.INT64:
|
|
208
218
|
max_int, min_int = column.max(), column.min()
|
|
209
219
|
if np.int16(max_int) == max_int and np.int16(min_int) == min_int:
|
|
210
220
|
return 'smallint'
|
|
@@ -229,9 +239,21 @@ class Postgres(BaseSQL):
|
|
|
229
239
|
self,
|
|
230
240
|
cursor: _psycopg.cursor,
|
|
231
241
|
df: DataFrame,
|
|
242
|
+
db_dtypes: List[str],
|
|
243
|
+
dtypes: List[str],
|
|
232
244
|
full_table_name: str,
|
|
233
|
-
buffer: Union[IO, None] = None
|
|
245
|
+
buffer: Union[IO, None] = None,
|
|
246
|
+
allow_reserved_words: bool = False,
|
|
247
|
+
unique_conflict_method: str = None,
|
|
248
|
+
unique_constraints: List[str] = None,
|
|
234
249
|
) -> None:
|
|
250
|
+
def clean_array_value(val):
|
|
251
|
+
if val is None or type(val) is not str or len(val) < 2:
|
|
252
|
+
return val
|
|
253
|
+
if val[0] == '[' and val[-1] == ']':
|
|
254
|
+
return '{' + val[1:-1] + '}'
|
|
255
|
+
return val
|
|
256
|
+
|
|
235
257
|
df_ = df.copy()
|
|
236
258
|
columns = df_.columns
|
|
237
259
|
|
|
@@ -239,28 +261,49 @@ class Postgres(BaseSQL):
|
|
|
239
261
|
df_col_dropna = df_[col].dropna()
|
|
240
262
|
if df_col_dropna.count() == 0:
|
|
241
263
|
continue
|
|
242
|
-
if
|
|
264
|
+
if dtypes[col] in JSON_SERIALIZABLE_TYPES \
|
|
265
|
+
or (df_[col].dtype == PandasTypes.OBJECT and
|
|
266
|
+
type(df_col_dropna.iloc[0]) != str):
|
|
243
267
|
df_[col] = df_[col].apply(lambda x: simplejson.dumps(
|
|
244
268
|
x,
|
|
245
269
|
default=encode_complex,
|
|
246
270
|
ignore_nan=True,
|
|
247
271
|
))
|
|
272
|
+
if '[]' in db_dtypes[col]:
|
|
273
|
+
df_[col] = df_[col].apply(lambda x: clean_array_value(x))
|
|
248
274
|
|
|
249
|
-
|
|
250
|
-
buffer,
|
|
251
|
-
header=False,
|
|
252
|
-
index=False,
|
|
253
|
-
na_rep='',
|
|
254
|
-
)
|
|
275
|
+
values = []
|
|
255
276
|
|
|
256
|
-
|
|
277
|
+
for _, row in df_.iterrows():
|
|
278
|
+
t = tuple(row)
|
|
279
|
+
if len(t) == 1:
|
|
280
|
+
value = f'({str(t[0])})'
|
|
281
|
+
else:
|
|
282
|
+
value = str(t)
|
|
283
|
+
values.append(value.replace('None', 'NULL'))
|
|
284
|
+
values_string = ', '.join(values)
|
|
285
|
+
insert_columns = ', '.join([f'"{col}"'for col in columns])
|
|
286
|
+
|
|
287
|
+
commands = [
|
|
288
|
+
f'INSERT INTO {full_table_name} ({insert_columns})',
|
|
289
|
+
f'VALUES {values_string}',
|
|
290
|
+
]
|
|
291
|
+
if unique_constraints and unique_conflict_method:
|
|
292
|
+
unique_constraints = \
|
|
293
|
+
[f'"{self._clean_column_name(col, allow_reserved_words=allow_reserved_words)}"'
|
|
294
|
+
for col in unique_constraints]
|
|
295
|
+
columns_cleaned = \
|
|
296
|
+
[f'"{self._clean_column_name(col, allow_reserved_words=allow_reserved_words)}"'
|
|
297
|
+
for col in columns]
|
|
257
298
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
)
|
|
266
|
-
|
|
299
|
+
commands.append(f"ON CONFLICT ({', '.join(unique_constraints)})")
|
|
300
|
+
if UNIQUE_CONFLICT_METHOD_UPDATE == unique_conflict_method:
|
|
301
|
+
update_command = [f'{col} = EXCLUDED.{col}' for col in columns_cleaned]
|
|
302
|
+
commands.append(
|
|
303
|
+
f"DO UPDATE SET {', '.join(update_command)}",
|
|
304
|
+
)
|
|
305
|
+
else:
|
|
306
|
+
commands.append('DO NOTHING')
|
|
307
|
+
cursor.execute(
|
|
308
|
+
'\n'.join(commands)
|
|
309
|
+
)
|
mage_ai/io/sql.py
CHANGED
|
@@ -43,9 +43,15 @@ class BaseSQL(BaseSQLConnection):
|
|
|
43
43
|
self,
|
|
44
44
|
dtypes: Mapping[str, str],
|
|
45
45
|
schema_name: str,
|
|
46
|
-
table_name: str
|
|
46
|
+
table_name: str,
|
|
47
|
+
unique_constraints: List[str] = [],
|
|
47
48
|
) -> str:
|
|
48
|
-
return gen_table_creation_query(
|
|
49
|
+
return gen_table_creation_query(
|
|
50
|
+
dtypes,
|
|
51
|
+
schema_name,
|
|
52
|
+
table_name,
|
|
53
|
+
unique_constraints=unique_constraints,
|
|
54
|
+
)
|
|
49
55
|
|
|
50
56
|
def build_create_table_as_command(
|
|
51
57
|
self,
|
|
@@ -80,6 +86,8 @@ class BaseSQL(BaseSQLConnection):
|
|
|
80
86
|
self,
|
|
81
87
|
cursor,
|
|
82
88
|
df: DataFrame,
|
|
89
|
+
db_dtypes: List[str],
|
|
90
|
+
dtypes: List[str],
|
|
83
91
|
full_table_name: str,
|
|
84
92
|
buffer: Union[IO, None] = None
|
|
85
93
|
) -> None:
|
|
@@ -183,6 +191,9 @@ class BaseSQL(BaseSQLConnection):
|
|
|
183
191
|
query_string: Union[str, None] = None,
|
|
184
192
|
drop_table_on_replace: bool = False,
|
|
185
193
|
cascade_on_drop: bool = False,
|
|
194
|
+
allow_reserved_words: bool = False,
|
|
195
|
+
unique_conflict_method: str = None,
|
|
196
|
+
unique_constraints: List[str] = None,
|
|
186
197
|
) -> None:
|
|
187
198
|
"""
|
|
188
199
|
Exports dataframe to the connected database from a Pandas data frame. If table doesn't
|
|
@@ -221,7 +232,10 @@ class BaseSQL(BaseSQLConnection):
|
|
|
221
232
|
df = clean_df_for_export(df, self.clean, dtypes)
|
|
222
233
|
|
|
223
234
|
# Clean column names
|
|
224
|
-
col_mapping = {col: self._clean_column_name(
|
|
235
|
+
col_mapping = {col: self._clean_column_name(
|
|
236
|
+
col,
|
|
237
|
+
allow_reserved_words=allow_reserved_words)
|
|
238
|
+
for col in df.columns}
|
|
225
239
|
df = df.rename(columns=col_mapping)
|
|
226
240
|
dtypes = infer_dtypes(df)
|
|
227
241
|
|
|
@@ -263,12 +277,27 @@ class BaseSQL(BaseSQLConnection):
|
|
|
263
277
|
)
|
|
264
278
|
cur.execute(query)
|
|
265
279
|
else:
|
|
280
|
+
db_dtypes = {col: self.get_type(df[col], dtypes[col]) for col in dtypes}
|
|
266
281
|
if should_create_table:
|
|
267
|
-
|
|
268
|
-
|
|
282
|
+
query = self.build_create_table_command(
|
|
283
|
+
db_dtypes,
|
|
284
|
+
schema_name,
|
|
285
|
+
table_name,
|
|
286
|
+
unique_constraints=unique_constraints,
|
|
287
|
+
)
|
|
269
288
|
cur.execute(query)
|
|
270
289
|
|
|
271
|
-
self.upload_dataframe(
|
|
290
|
+
self.upload_dataframe(
|
|
291
|
+
cur,
|
|
292
|
+
df,
|
|
293
|
+
db_dtypes,
|
|
294
|
+
dtypes,
|
|
295
|
+
full_table_name,
|
|
296
|
+
buffer,
|
|
297
|
+
allow_reserved_words=allow_reserved_words,
|
|
298
|
+
unique_conflict_method=unique_conflict_method,
|
|
299
|
+
unique_constraints=unique_constraints,
|
|
300
|
+
)
|
|
272
301
|
self.conn.commit()
|
|
273
302
|
|
|
274
303
|
if verbose:
|
mage_ai/io/trino.py
CHANGED
|
@@ -15,7 +15,7 @@ from pandas import DataFrame, Series
|
|
|
15
15
|
from trino.auth import BasicAuthentication
|
|
16
16
|
from trino.dbapi import Connection, Cursor as CursorParent
|
|
17
17
|
from trino.transaction import IsolationLevel
|
|
18
|
-
from typing import IO, Mapping, Union
|
|
18
|
+
from typing import IO, List, Mapping, Union
|
|
19
19
|
import pandas as pd
|
|
20
20
|
|
|
21
21
|
|
|
@@ -86,7 +86,8 @@ class Trino(BaseSQL):
|
|
|
86
86
|
self,
|
|
87
87
|
dtypes: Mapping[str, str],
|
|
88
88
|
schema_name: str,
|
|
89
|
-
table_name: str
|
|
89
|
+
table_name: str,
|
|
90
|
+
unique_constraints: List[str] = [],
|
|
90
91
|
):
|
|
91
92
|
query = []
|
|
92
93
|
for cname in dtypes:
|
|
@@ -123,8 +124,11 @@ class Trino(BaseSQL):
|
|
|
123
124
|
self,
|
|
124
125
|
cursor: Cursor,
|
|
125
126
|
df: DataFrame,
|
|
127
|
+
db_dtypes: List[str],
|
|
128
|
+
dtypes: List[str],
|
|
126
129
|
full_table_name: str,
|
|
127
|
-
buffer: Union[IO, None] = None
|
|
130
|
+
buffer: Union[IO, None] = None,
|
|
131
|
+
**kwargs,
|
|
128
132
|
) -> None:
|
|
129
133
|
values = []
|
|
130
134
|
for _, row in df.iterrows():
|
mage_ai/server/constants.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-bc5e4eb2c1ff587c.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-bb0dd5375146d7fd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7e791bee1e32adec.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-bc5e4eb2c1ff587c.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-bb0dd5375146d7fd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7e791bee1e32adec.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/UYQNglbviUz843DEKVYAI/_buildManifest.js" defer=""></script><script src="/_next/static/UYQNglbviUz843DEKVYAI/_ssgManifest.js" defer=""></script><script src="/_next/static/UYQNglbviUz843DEKVYAI/_middlewareManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
|
|
2
2
|
*,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
|
|
3
3
|
data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
|
|
4
4
|
.kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
|
|
@@ -19,4 +19,4 @@ data-styled.g5[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
|
|
|
19
19
|
.next-error-h1 {
|
|
20
20
|
border-right: 1px solid rgba(255, 255, 255, .3);
|
|
21
21
|
}
|
|
22
|
-
}</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"#FFB9FC","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","table":"#292A2F"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"
|
|
22
|
+
}</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"#FFB9FC","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","table":"#292A2F"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"UYQNglbviUz843DEKVYAI","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-bc5e4eb2c1ff587c.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-bb0dd5375146d7fd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7e791bee1e32adec.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-bc5e4eb2c1ff587c.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-bb0dd5375146d7fd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-7e791bee1e32adec.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/UYQNglbviUz843DEKVYAI/_buildManifest.js" defer=""></script><script src="/_next/static/UYQNglbviUz843DEKVYAI/_ssgManifest.js" defer=""></script><script src="/_next/static/UYQNglbviUz843DEKVYAI/_middlewareManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
|
|
2
2
|
*,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
|
|
3
3
|
data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
|
|
4
4
|
.kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
|
|
@@ -19,4 +19,4 @@ data-styled.g5[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
|
|
|
19
19
|
.next-error-h1 {
|
|
20
20
|
border-right: 1px solid rgba(255, 255, 255, .3);
|
|
21
21
|
}
|
|
22
|
-
}</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"#FFB9FC","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","table":"#292A2F"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"
|
|
22
|
+
}</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"#FFB9FC","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","table":"#292A2F"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"UYQNglbviUz843DEKVYAI","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,e,i,n,p,c,t,a,l,u,r,f,k,g,b,d,h,j,o,_,m,E,w,O,A,B,L,D,T){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/datasets",destination:o},{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_",destination:o}],fallback:[]},"/":["static/chunks/pages/index-e34a68d2f6fe16f2.js"],"/_error":["static/chunks/pages/_error-235304e5badb19eb.js"],"/manage":[s,n,_,e,i,p,c,m,"static/chunks/pages/manage-3046bc53d24917c7.js"],"/pipeline-runs":[s,n,e,i,p,c,g,"static/chunks/pages/pipeline-runs-e64ba4e8b2bfe73c.js"],"/pipelines":[s,n,e,i,p,c,"static/chunks/pages/pipelines-7446a70bdd8381a5.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-ca9457e1a6bced4b.js"],"/pipelines/[pipeline]/backfills":[s,n,e,i,p,c,t,"static/chunks/pages/pipelines/[pipeline]/backfills-5f95bb4c3a2d7d46.js"],"/pipelines/[pipeline]/backfills/[...slug]":[s,n,a,l,u,f,b,j,e,i,p,c,t,r,k,g,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-aac92b9ab9034c1a.js"],"/pipelines/[pipeline]/edit":[E,s,n,a,l,u,f,b,d,h,w,O,A,_,"static/chunks/4538-347283088b83c6bf.js",e,i,p,c,r,k,m,B,L,"static/chunks/pages/pipelines/[pipeline]/edit-
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,e,i,n,p,c,t,a,l,u,r,f,k,g,b,d,h,j,o,_,m,E,w,O,A,B,L,D,T){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/datasets",destination:o},{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_",destination:o}],fallback:[]},"/":["static/chunks/pages/index-e34a68d2f6fe16f2.js"],"/_error":["static/chunks/pages/_error-235304e5badb19eb.js"],"/manage":[s,n,_,e,i,p,c,m,"static/chunks/pages/manage-3046bc53d24917c7.js"],"/pipeline-runs":[s,n,e,i,p,c,g,"static/chunks/pages/pipeline-runs-e64ba4e8b2bfe73c.js"],"/pipelines":[s,n,e,i,p,c,"static/chunks/pages/pipelines-7446a70bdd8381a5.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-ca9457e1a6bced4b.js"],"/pipelines/[pipeline]/backfills":[s,n,e,i,p,c,t,"static/chunks/pages/pipelines/[pipeline]/backfills-5f95bb4c3a2d7d46.js"],"/pipelines/[pipeline]/backfills/[...slug]":[s,n,a,l,u,f,b,j,e,i,p,c,t,r,k,g,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-aac92b9ab9034c1a.js"],"/pipelines/[pipeline]/edit":[E,s,n,a,l,u,f,b,d,h,w,O,A,_,"static/chunks/4538-347283088b83c6bf.js",e,i,p,c,r,k,m,B,L,"static/chunks/pages/pipelines/[pipeline]/edit-aaf065c2c2a70e6e.js"],"/pipelines/[pipeline]/logs":[s,n,l,d,j,e,i,p,c,t,"static/chunks/pages/pipelines/[pipeline]/logs-f8544e3e6ad7c1ff.js"],"/pipelines/[pipeline]/monitors":[s,n,a,h,e,i,p,t,D,"static/chunks/pages/pipelines/[pipeline]/monitors-675171cfd7d7b346.js"],"/pipelines/[pipeline]/monitors/block-runs":[s,n,a,h,e,i,p,t,D,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-dbd14363a06d17c5.js"],"/pipelines/[pipeline]/monitors/block-runtime":[E,s,n,a,h,"static/chunks/9832-f97919376d52e3bf.js",e,i,p,t,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-187456108be8a7e6.js"],"/pipelines/[pipeline]/runs":[s,n,l,u,b,e,i,p,c,t,r,g,"static/chunks/pages/pipelines/[pipeline]/runs-f5842a788b0cb80c.js"],"/pipelines/[pipeline]/runs/[run]":[s,n,a,l,u,f,w,e,i,p,c,t,r,k,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-b2955f0ff960894e.js"],"/pipelines/[pipeline]/syncs":[s,n,d,e,i,p,c,t,"static/chunks/pages/pipelines/[pipeline]/syncs-e1271453ed0c8d6e.js"],"/pipelines/[pipeline]/triggers":[s,n,a,l,u,f,e,i,p,c,t,r,k,"static/chunks/pages/pipelines/[pipeline]/triggers-4e973d4bc0ebcdc1.js"],"/pipelines/[pipeline]/triggers/[...slug]":[s,n,a,l,u,f,b,j,e,i,p,c,t,r,k,g,L,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6160e7f91a340354.js"],"/settings":["static/chunks/pages/settings-d594a66a568306da.js"],"/settings/account/profile":[s,e,i,T,"static/chunks/pages/settings/account/profile-f1844beb127841f3.js"],"/settings/workspace/preferences":[s,e,i,"static/chunks/pages/settings/workspace/preferences-997acba85f777259.js"],"/settings/workspace/sync-data":[s,e,i,"static/chunks/pages/settings/workspace/sync-data-8c903140c99e487c.js"],"/settings/workspace/users":[s,n,e,i,p,c,T,"static/chunks/pages/settings/workspace/users-d72dfc596e943cc4.js"],"/sign-in":[s,e,"static/chunks/pages/sign-in-404d934deb8950d5.js"],"/terminal":[s,d,A,e,i,B,"static/chunks/pages/terminal-6c0ea500b3bc6b61.js"],"/test":[O,"static/chunks/pages/test-85cf18ae78ff535c.js"],"/triggers":[s,n,e,i,p,c,"static/chunks/pages/triggers-783b9526167f1249.js"],sortedPages:["/","/_app","/_error","/manage","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/settings","/settings/account/profile","/settings/workspace/preferences","/settings/workspace/sync-data","/settings/workspace/users","/sign-in","/terminal","/test","/triggers"]}}("static/chunks/3850-6395783d820def1c.js","static/chunks/2344-5cd452dd1825dabc.js","static/chunks/9386-d4cc11bab74eec8d.js","static/chunks/2083-78a438dbdc57d1e4.js","static/chunks/6166-2ee6aff0ca70b2f0.js","static/chunks/8180-8de652170ea5ed93.js","static/chunks/2626-e7fa4f83f8214c97.js","static/chunks/5896-10a676bcc86978cc.js","static/chunks/4804-01a10103ebe26ca8.js","static/chunks/1774-aa51ef1da7217ff9.js","static/chunks/6532-dcc478dab6a58580.js","static/chunks/5872-1767c45ee6690ae5.js","static/chunks/1286-a62050b3f897c6be.js","static/chunks/4178-9103014b7dae3c49.js","static/chunks/2524-6aeb9419acf5d1b4.js","static/chunks/9565-28e1c30511c95c2d.js","static/chunks/2714-1e79e9f2e998b544.js","static/chunks/4495-4f0340aa82e0c623.js","/datasets","static/chunks/8789-4f858e520d46973b.js","static/chunks/4261-6c235b561c91eca3.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/2125-0b537dc53fe71b18.js","static/chunks/7011-81dd8269c4806d26.js","static/chunks/6085-692d2f784c0504f2.js","static/chunks/5141-ddf4ba0a362d6f34.js","static/chunks/839-c0deab1de13a0fba.js","static/chunks/7400-f4db9b5d41f67f75.js","static/chunks/5477-b439f211b6146a11.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5141],{33699:function(n,t,e){e.d(t,{Z:function(){return k}});var r=e(89565),i=e.n(r),o=e(82684),a=e(47999),c=e(82635),u=e(19711),s=e(9518),l=e(23831),d=e(49125),f=e(37391),p=(0,s.css)([""," ",""],(function(n){return!n.width&&"\n width: 100%;\n "}),(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")})),g=s.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-11d4rgl-0"})([""," "," height:100%;overflow:auto;position:absolute;",""],p,f.w5,(function(n){return"\n background-color: ".concat((n.theme.background||l.Z.background).codeTextarea,";\n ")})),h=s.default.div.withConfig({displayName:"indexstyle__InnerStyle",componentId:"sc-11d4rgl-1"})([""," padding:","px;"],p,d.cd*d.iI),y=s.default.div.withConfig({displayName:"indexstyle__LineStyle",componentId:"sc-11d4rgl-2"})(["height:","px;"],20),v=(0,s.css)(["@keyframes cursor-blink{0%{opacity:0;}}::before{","}::after{","}"],(function(n){return n.focusBeginning&&"\n position: absolute;\n background-color: ".concat((n.theme.accent||l.Z.accent).warning,';\n content: "";\n display: inline-block;\n height: ').concat(20,"px;\n width: ").concat(d.iI,"px;\n opacity: 0.3;\n ")}),(function(n){return n.focused&&"\n background-color: ".concat((n.theme.accent||l.Z.accent).warning,';\n content: "";\n display: inline-block;\n height: ').concat(20,"px;\n width: ").concat(d.iI,"px;\n opacity: 0.3;\n ")})),m=s.default.div.withConfig({displayName:"indexstyle__InputStyle",componentId:"sc-11d4rgl-3"})(["align-items:center;display:flex;gap:2px;",""],v),b=s.default.span.withConfig({displayName:"indexstyle__CharacterStyle",componentId:"sc-11d4rgl-4"})([""," ::after{","}"],v,(function(n){return n.focused&&"\n position: absolute;\n "})),S=e(16115),x=e(51504),T=e(66653),w=e(41150),P=e(28598);function E(n,t){var e="undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,t){if(!n)return;if("string"===typeof n)return I(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return I(n,t)}(n))||t&&n&&"number"===typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,o=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw o}}}}function I(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}var k=function(n){var t=n.interruptKernel,e=n.lastMessage,r=n.onFocus,s=n.sendMessage,l=n.uuid,d=void 0===l?"terminal":l,f=n.width,p=(0,o.useRef)(null),v=(0,o.useRef)(null),I=(0,o.useState)(""),k=I[0],A=I[1],N=(0,o.useState)(0),C=N[0],_=N[1],j=(0,o.useState)(""),O=j[0],M=j[1],R=(0,o.useState)(0),Z=R[0],G=R[1],U=(0,o.useState)([]),X=U[0],F=U[1],Y=(0,o.useState)(!1),D=Y[0],L=Y[1],K=(0,o.useState)([]),Q=(K[0],K[1]),B=(0,o.useState)(),H=B[0],z=B[1];(0,o.useEffect)((function(){if(e){var n=JSON.parse(e.data);z((function(t){var e=t||"";return"stdout"===n[0]?e+n[1]:e}))}}),[e,d]);var J=(0,o.useMemo)((function(){return H?H.split("\n").filter((function(n){return!n.includes("# Mage terminal settings command")})).map((function(n){return{data:n,type:c.Gi.TEXT}})):[]}),[H]);(0,o.useEffect)((function(){if(p.current&&v.current){var n=v.current.getBoundingClientRect().height;p.current.scrollTo(0,n)}}),[J,p,v]);var V=(0,w.y)(),q=V.registerOnKeyDown,$=V.setDisableGlobalKeyboardShortcuts,W=V.unregisterOnKeyDown;(0,o.useEffect)((function(){return function(){W(d)}}),[W,d]);var nn=(0,o.useCallback)((function(){G((function(n){return n>0?n-1:n}))}),[]),tn=(0,o.useCallback)((function(){G((function(n){return n<=k.length?n+1:n}))}),[k]),en=(0,o.useCallback)((function(n){var t=(null===n||void 0===n?void 0:n.split(/\n/))||[];if(t.length>1){var e=t.slice(0,-1);e[0]=k+e[0];var r=e.map((function(n,t){return{command:0===t,data:n,type:c.Gi.TEXT}}));_(X.length+e.length),F((function(n){return n.concat(e)})),Q((function(n){return n.concat(r)})),M((function(n){return n+e.join("\n")}));var i=(t.slice(-1)[0]||"").trim();A(i),G(i.length)}else A((function(t){return t+n})),G(k.length+n.length)}),[k,X]);q(d,(function(n,t,e){var r=n.code,i=n.key;if(D)if((0,T.j)(n),(0,x.y)([S.PQ,S.VS],t)){var o=O+k;(null===o||void 0===o?void 0:o.length)>=0&&(s(JSON.stringify(["stdin",o])),s(JSON.stringify(["stdin","\x03"])),G(0)),M(""),A("")}else if(S.Qj!==r||t[S.zX])if((0,x.y)([S.QK],t))nn();else if((0,x.y)([S.DY],t))tn();else if((0,x.y)([S.Bu],t)){if(X.length>=1){var a,c=Math.max(0,C-1);A(X[c]),_(c),G((null===(a=X[c])||void 0===a?void 0:a.length)||0)}}else if((0,x.y)([S.kD],t)){if(X.length>=1){var u=Math.min(X.length,C+1),l=X[u]||"";A(l),_(u),G(l.length)}}else if((0,x.y)([S.Uq],t)){var d=O+k;s(JSON.stringify(["stdin",d])),s(JSON.stringify(["stdin","\r"])),(null===d||void 0===d?void 0:d.length)>=2&&(_(X.length+1),F((function(n){return n.concat(k)})),G(0)),M(""),A("")}else if((0,x.y)([S.zX,S.VS],t))navigator.clipboard.writeText(window.getSelection().toString());else if((0,x.y)([S.zX,S.Pd],t)||(0,x.y)([S.PQ,S.Pd],t)){var f,p,g,h,y;"undefined"===typeof(null===(f=navigator)||void 0===f?void 0:f.clipboard)?alert('Clipboard pasting is not allowed in insecure contexts. If your Mage deployment is not secure but you still want to use clipboard paste, you can override this setting (which should only be done temporarily) on Chrome browsers by going to "chrome://flags/#unsafely-treat-insecure-origin-as-secure", adding your origin to "Insecure origins treated as secure", and enabling that setting.'):null!==(p=navigator)&&void 0!==p&&null!==(g=p.clipboard)&&void 0!==g&&g.readText?navigator.clipboard.readText().then(en).catch((function(n){return alert("".concat(n,'\n For Chrome, users need to allow clipboard permissions for this site under "Privacy and security" -> "Site settings".\n For Safari, users need to allow the clipboard paste by clicking "Paste" in the context menu that appears.'))})):null!==(h=navigator)&&void 0!==h&&null!==(y=h.clipboard)&&void 0!==y&&y.read?navigator.clipboard.read().then((function(n){var t,e=E(n);try{for(e.s();!(t=e.n()).done;){var r,i=t.value,o=E(i.types);try{for(o.s();!(r=o.n()).done;){var a=r.value;if("text/plain"===a)return i.getType(a)}}catch(c){o.e(c)}finally{o.f()}}}catch(c){e.e(c)}finally{e.f()}})).then((function(n){return n.text()})).then(en).catch((function(n){return alert("".concat(n,'\n For Firefox, users need to allow clipboard paste by setting the "dom.events.asyncClipboard.read" preference in "about:config" to "true" and clicking "Paste" in the context menu that appears.'))})):alert('If pasting is not working properly, you may need to adjust some settings in your browser.\n\n For Firefox, users need to allow clipboard paste by setting both the "dom.events.asyncClipboard.clipboardItem" and "dom.events.asyncClipboard.read" preferences in "about:config" to "true" and clicking "Paste" in the context menu that appears.\n For Chrome, users need to allow clipboard permissions for this site under "Privacy and security" -> "Site settings".\n For Safari, users need to allow the clipboard paste by clicking "Paste" in the context menu that appears.\n')}else t[S.zX]||t[S.PQ]||1!==i.length||(A((function(n){return n.slice(0,Z)+i+n.slice(Z)})),tn());else{var v=Math.max(0,Z-1);A((function(n){return n.slice(0,v)+n.slice(Z)})),G((function(n){return Math.max(0,n-1)}))}}),[k,X,C,D,t,A,F,_,Q,d]);var rn=(0,o.useMemo)((function(){var n;return null===(n=J[J.length-1])||void 0===n?void 0:n.data}),[J]);return(0,P.jsx)(g,{ref:p,width:f,children:(0,P.jsx)(a.Z,{isOpen:!0,onClick:function(){null===r||void 0===r||r(),L(!0),$(!0)},onClickOutside:function(){L(!1),$(!1)},style:{minHeight:"100%"},children:(0,P.jsxs)(h,{ref:v,width:f,children:[null===J||void 0===J?void 0:J.reduce((function(n,t,e){if(e==J.length-1)return n;var r=t||{},o=r.command,a=r.data,s=r.type,l=[];l=(l=Array.isArray(a)?a:[a]).filter((function(n){return n}));var d=[];return l.forEach((function(n,t){var r;if(c.jU.includes(s)&&(r=(0,P.jsx)(u.ZP,{monospace:!0,noWrapping:!0,pre:!0,children:n&&(0,P.jsx)(i(),{children:n})})),r){var a="command-".concat(e,"-").concat(t,"-").concat(n);o||d.push((0,P.jsx)(y,{children:r},a))}})),n.concat(d)}),[]),(0,P.jsx)(m,{focused:D&&(0===(null===k||void 0===k?void 0:k.length)||Z>(null===k||void 0===k?void 0:k.length)),children:(0,P.jsxs)(u.ZP,{monospace:!0,children:[(0,P.jsx)(u.ZP,{inline:!0,monospace:!0,children:rn&&(0,P.jsx)(i(),{children:rn})}),null===k||void 0===k?void 0:k.split("").map((function(n,t){return(0,P.jsxs)(b,{focusBeginning:D&&0===Z&&0===t,focused:D&&Z===t+1,children:[" "===n&&(0,P.jsx)(P.Fragment,{children:"\xa0"})," "!==n&&n]},"command-".concat(t,"-").concat(n))}))]})})]})})})}},82635:function(n,t,e){var r,i;e.d(t,{Gi:function(){return i},jU:function(){return a},uF:function(){return r}}),function(n){n.BUSY="busy",n.IDLE="idle",n.QUEUED="queued"}(r||(r={})),function(n){n.IMAGE_PNG="image/png",n.PROGRESS="progress",n.TABLE="table",n.TEXT="text",n.TEXT_HTML="text/html",n.TEXT_PLAIN="text/plain"}(i||(i={}));var o,a=[i.TEXT,i.TEXT_PLAIN];!function(n){n.DISPLAY_DATA="display_data",n.STATUS="status",n.STREAM="stream",n.STREAM_PIPELINE="stream_pipeline"}(o||(o={}))},98781:function(n,t,e){e.d(t,{$1:function(){return u},G7:function(){return l},QK:function(){return c},a_:function(){return d},qL:function(){return o},r0:function(){return s}});var r,i,o,a=e(82394);!function(n){n.INTEGRATION="integration",n.PYTHON="python",n.PYSPARK="pyspark",n.STREAMING="streaming"}(o||(o={}));var c,u,s,l=(r={},(0,a.Z)(r,o.INTEGRATION,"Integration"),(0,a.Z)(r,o.PYTHON,"Standard"),(0,a.Z)(r,o.PYSPARK,"PySpark"),(0,a.Z)(r,o.STREAMING,"Streaming"),r);!function(n){n.ACTIVE="active",n.INACTIVE="inactive",n.NO_SCHEDULES="no_schedules"}(c||(c={})),function(n){n.GROUP="group_by",n.STATUS="status[]",n.TYPE="type[]"}(u||(u={})),function(n){n.STATUS="status",n.TYPE="type"}(s||(s={}));var d=(i={},(0,a.Z)(i,o.PYTHON,"python3"),(0,a.Z)(i,o.PYSPARK,"pysparkkernel"),i)},51504:function(n,t,e){e.d(t,{y:function(){return o}});var r=e(75582),i=e(16115);function o(n,t){var e=n.map((function(n){return String(n)})),o=n.includes(i.PQ),a=n.includes(i.zX),c=n.includes(i.XR),u=i.xU.map((function(n){return String(n)})),s=i.vk.map((function(n){return String(n)})),l=i.Tr.map((function(n){return String(n)})),d=Object.entries(t).find((function(n){var t=(0,r.Z)(n,2),i=t[0];return t[1]&&!e.includes(String(i))&&(!a||!s.includes(String(i)))&&(!o||!u.includes(String(i)))&&(!c||!l.includes(String(i)))}));return n.every((function(n){return t[n]}))&&!d}}}]);
|