aliyun / alibabacloud-odps-maxframe-client

Apache License 2.0
3 stars 1 forks source link

Error During Transform Execution: 'Table Lifecycle Not Specified in Mandatory Mode' #10

Open snowljs opened 2 weeks ago

snowljs commented 2 weeks ago
Traceback (most recent call last):
  File "<pyodps_user_code>", line 22, in <module>
    res = df.transform([mt.sqrt, mt.exp]).execute().fetch()
  File "/home/tops/lib/python3.7/site-packages/maxframe/core/entity/tileables.py", line 434, in execute
    result = self.data.execute(session=session, **kw)
  File "/home/tops/lib/python3.7/site-packages/maxframe/core/entity/executable.py", line 150, in execute
    return execute(self, session=session, **kw)
  File "/home/tops/lib/python3.7/site-packages/maxframe/session.py", line 1061, in execute
    **kwargs,
  File "/home/tops/lib/python3.7/site-packages/maxframe/session.py", line 873, in execute
    timeout=self._isolated_session.timeout
  File "/home/tops/lib/python3.7/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/home/tops/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/tops/lib/python3.7/site-packages/maxframe/utils.py", line 976, in cb
    dest.set_result(fut.result())
  File "/home/tops/lib/python3.7/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/home/tops/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/tops/lib/python3.7/site-packages/maxframe/session.py", line 1007, in _execute
    execution_info = await session.execute(*tileables, **kwargs)
  File "/home/tops/lib/python3.7/site-packages/maxframe_client/session/odps.py", line 229, in execute
    source_replacements = self._scan_and_replace_pandas_sources(tileable_graph)
  File "/home/tops/lib/python3.7/site-packages/maxframe/core/mode.py", line 77, in _inner
    return func(*args, **kwargs)
  File "/home/tops/lib/python3.7/site-packages/maxframe_client/session/odps.py", line 187, in _scan_and_replace_pandas_sources
    replaced = self._upload_and_get_read_tileable(t)
  File "/home/tops/lib/python3.7/site-packages/maxframe_client/session/odps.py", line 145, in _upload_and_get_read_tileable
    table_obj = self._odps_entry.create_table(table_name, schema)
  File "/home/tops/lib/python3.7/site-packages/odps/utils.py", line 988, in wrapped
    return func(*args, **kwargs)
  File "/home/tops/lib/python3.7/site-packages/odps/core.py", line 586, in create_table
    storage_tier=storage_tier, async_=async_, **kw
  File "/home/tops/lib/python3.7/site-packages/odps/utils.py", line 988, in wrapped
    return func(*args, **kwargs)
  File "/home/tops/lib/python3.7/site-packages/odps/models/tables.py", line 121, in create
    instance.wait_for_success()
  File "/home/tops/lib/python3.7/site-packages/odps/models/instance.py", line 729, in wait_for_success
    raise exc
odps.errors.ODPSError: ODPS-0130071: InstanceId: 2024061903405375gz6ly00hfvt3
ODPS-0130071:[1,14] Semantic analysis exception - table lifecycle is not specified in mandatory mode

Maxframe code:

from maxframe import new_session
import numpy as np
import pandas as pd
import maxframe.tensor as mt

from maxframe import config
config.options.sql.settings = {
    "odps.session.image": "common",
    "odps.sql.type.system.odps2": "true"
}

session = new_session(o)
print(session.session_id + "\n---")

df = md.DataFrame(pd.DataFrame({'A': range(3), 'B': range(1, 4)}))
res = df.transform([mt.sqrt, mt.exp]).execute().fetch()
print(res)
snowljs commented 1 week ago
new_dtypes=pd.Series({"_data": np.dtype(np.float_)})
s.transform(mt.sqrt,dtypes=new_dtypes).execute()
File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/services/dag/dagrunner.py:523](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/services/dag/dagrunner.py#line=522), in _run()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/protocol.py:209](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/protocol.py#line=208), in reraise()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/runners/mcsql.py:462](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/runners/mcsql.py#line=461), in _run()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/runners/mcsql.py:276](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/runners/mcsql.py#line=275), in _on_generate_code_action()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/mcsql_codegen/core.py:245](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/mcsql_codegen/core.py#line=244), in generate()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/codegen.py:468](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/codegen.py#line=467), in generate()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/codegen.py:438](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/codegen.py#line=437), in generate_code()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/mcsql_codegen/dataframe/misc/transform.py:45](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/mcsql_codegen/dataframe/misc/transform.py#line=44), in generate_code()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/mcsql_codegen/dataframe/misc/transform.py:56](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe_framedriver/mcsql_codegen/dataframe/misc/transform.py#line=55), in _get_output_col_to_input_exp()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/codegen.py:251](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/codegen.py#line=250), in get_odps_schema()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/odpsio/schema.py:217](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/odpsio/schema.py#line=216), in pandas_to_odps_schema()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/odpsio/schema.py:102](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/odpsio/schema.py#line=101), in arrow_schema_to_odps_schema()

File [/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/odpsio/schema.py:92](http://localhost:8888/apsara/odps/KubeTempRoot/releasea/executor-releasea-102/MAXFRAME_TASK_default_2024-06-20-18-15-23-2916_1_10950_1/python/framedriver/maxframe/odpsio/schema.py#line=91), in arrow_type_to_odps_type()

TypeError: Unknown type null, column name is _data,specify `unknown_as_string=True` or `as_type` to set column dtype
Selection deleted