1

Google BigQuery を使用しており、それが提供する POSITION(field) 関数について質問があります。

POSITION 関数は、ネストされたフィールド内のクエリで値の位置を返すと思いました。

しかし、ネストされていないフィールドでも機能することに非常に驚いています。

例えば。

SELECT url, POSITION(url) FROM [publicdata:samples.github_timeline] WHERE url="https://github.com/oscardelben/sheet";

そして出力は

Row  url                                 f0_
1  https://github.com/oscardelben/sheet  1
2  https://github.com/oscardelben/sheet  2
3  https://github.com/oscardelben/sheet  3
4  https://github.com/oscardelben/sheet  4
5  https://github.com/oscardelben/sheet  5
6  https://github.com/oscardelben/sheet  6
7  https://github.com/oscardelben/sheet  1
8  https://github.com/oscardelben/sheet  2
9  https://github.com/oscardelben/sheet  3
....
...
..
.

このコンテキストで、POSITION(url) とはどういう意味ですか? また、テストできる Google BigQuery サンプルによって提供されるネストされたフィールドはありますか?

ありがとうございます

4

1 に答える 1

0

私が知る限り、ネストされていないフィールドの場合、POSITION はデータ シャードの行オフセットを返します。つまり、基になるデータが 100 個に分割され、結果が各部分に 10 行ある場合は、次のようになります。 1 ~ 10 の位置の値を 100 回繰り返します。これは特に有用ではありません。おそらく、これはグローバル位置を返すはずです (つまり、上記の場合は 1 ~ 1000 を返します)。同意する場合はお知らせください。変更できるかどうかを確認します。

于 2012-07-09T15:34:10.450 に答える