Giter VIP home page Giter VIP logo

Comments (12)

qinxuye avatar qinxuye commented on August 27, 2024
options.verbose = True

设置这个之后,再运行这个 %%sql ,把 logview 地址贴出来看下。

from aliyun-odps-python-sdk.

aabbiiL avatar aabbiiL commented on August 27, 2024

同样的报错,没有logview

from aliyun-odps-python-sdk.

qinxuye avatar qinxuye commented on August 27, 2024

project 是什么?

from aliyun-odps-python-sdk.

aabbiiL avatar aabbiiL commented on August 27, 2024

yxjr_tmp

from aliyun-odps-python-sdk.

qinxuye avatar qinxuye commented on August 27, 2024

把 sql 写成字符串,然后用

print(repr(sql))
o.execute_sql(sql) 

看下结果

from aliyun-odps-python-sdk.

aabbiiL avatar aabbiiL commented on August 27, 2024

'select * from llb_tp1 a left join llb_tp2 b on a.block_log_id=b.block_log_id'

NoSuchObject Traceback (most recent call last)
in ()
1 sql="select * from llb_tp1 a left join llb_tp2 b on a.block_log_id=b.block_log_id"
2 print(repr(sql))
----> 3 o.execute_sql(sql)

c:\python27\lib\site-packages\odps\core.pyc in execute_sql(self, sql, project, priority, running_cluster, hints, **kwargs)
707 inst = self.run_sql(
708 sql, project=project, priority=priority, running_cluster=running_cluster,
--> 709 hints=hints, **kwargs)
710 if not async:
711 inst.wait_for_success()

c:\python27\lib\site-packages\odps\core.pyc in run_sql(self, sql, project, priority, running_cluster, hints, aliases, **kwargs)
760 return project.instances.create(task=task, priority=priority,
761 running_cluster=running_cluster,
--> 762 create_callback=on_instance_create)
763
764 def list_volumes(self, project=None, owner=None):

c:\python27\lib\site-packages\odps\models\instances.pyc in create(self, xml, job, task, priority, running_cluster, headers, create_callback)
139 headers['Content-Type'] = 'application/xml'
140 url = self.resource()
--> 141 resp = self._client.post(url, xml, headers=headers)
142
143 location = resp.headers.get('Location')

c:\python27\lib\site-packages\odps\rest.pyc in post(self, url, data, **kwargs)
140 def post(self, url, data, **kwargs):
141 data = utils.to_binary(data, encoding='utf-8') if isinstance(data, six.string_types) else data
--> 142 return self.request(url, 'post', data=data, **kwargs)
143
144 def put(self, url, data, **kwargs):

c:\python27\lib\site-packages\odps\rest.pyc in request(self, url, method, stream, **kwargs)
132 # Automatically detect error
133 if not self.is_ok(res):
--> 134 errors.throw_if_parsable(res)
135 return res
136

c:\python27\lib\site-packages\odps\errors.pyc in throw_if_parsable(resp)
68
69 if e is not None:
---> 70 raise e
71
72 if resp.status_code == 404:

NoSuchObject: NoSuchObject: RequestId: 59B8E3966FF1A6CC3D23426F
ODPS-0130161:Parse exception - line 1:24 cannot recognize input near 'left' 'join' 'llb_tp2' in join type specifier

from aliyun-odps-python-sdk.

qinxuye avatar qinxuye commented on August 27, 2024

NoSuchObject 啊

llb_tp1 和 llb_tp2 存在吗

from aliyun-odps-python-sdk.

aabbiiL avatar aabbiiL commented on August 27, 2024

有啊 直接在odps就可以执行

from aliyun-odps-python-sdk.

qinxuye avatar qinxuye commented on August 27, 2024
print(o.get_table('llb_tp1').schema)
print(o.get_table('llb_tp2').schema)

结果给我看

from aliyun-odps-python-sdk.

aabbiiL avatar aabbiiL commented on August 27, 2024

odps.Schema {
block_log_id bigint
}

odps.Schema {
block_log_id bigint
id_no string
}

from aliyun-odps-python-sdk.

qinxuye avatar qinxuye commented on August 27, 2024

建议你开个工单,让查下什么原因导致的。

我这里建同样 schema 的表,跑没有任何问题。

In [18]: o.create_table('llb_tp1', 'block_log_id bigint')
Out[18]: 
odps.Table
  name: test_pyodps_dev.`llb_tp1`
  schema:
    block_log_id            : bigint      

In [19]: o.create_table('llb_tp2', 'block_log_id bigint, id_no string')
Out[19]: 
odps.Table
  name: test_pyodps_dev.`llb_tp2`
  schema:
    block_log_id            : bigint      
    id_no                   : string      

In [20]: %%sql
    ...: select * from llb_tp1 a left join llb_tp2 b on a.block_log_id=b.block_l
    ...: og_id
    ...: 
|==========================================|   1 /  1  (100.00%)        12s
Out[20]: 
Empty DataFrame
Columns: [block_log_id, block_log_id2, id_no]
Index: []

from aliyun-odps-python-sdk.

aabbiiL avatar aabbiiL commented on August 27, 2024

好的 谢谢

from aliyun-odps-python-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.