S02008

Error Code

S02008

Error Message

Direct access using column names is not supported to retrieve data from a DFS table. Please use a SQL query instead. RefId:S02008

Probable Causes

DFS tables are stored across multiple data nodes. To ensure secure concurrent read and write operations, direct access to DFS tables using member variable is not allowed. This error occurs when attempting to access a DFS table using column names.

For example:

n = 10000
type = take(1..10, n)
t = table(type)
dbName = "dfs://test_db";
if (existsDatabase(dbName)) {
    dropDatabase(dbName)
}
db = database(dbName, HASH, [INT, 2])
pt = db.createPartitionedTable(t, `pt, `type)
pt.append!(t)

pt.type

Solutions

Use a complete SQL statement to query a DFS table.

pt.type
==> select type from pt