Here’s how to use dup() functions.
Description:
Join up a cluster in-memory table into a local in-memory table.
Syntax:
T.dup()
Note:
The function joins up cluster in-memory table T to generate a local in-memory table.
Parameter:
T |
A cluster in-memory table |
Return value:
An in-memory table
Example:
|
A |
|
1 |
=file("D:/test0.ctx","169.254.121.62:8281") |
Open a cluster file. |
2 |
=A1.open() |
Return a cluster table. |
3 |
=A2.attach(table) |
Retrieve cluster table table. |
4 |
=A3.memory() |
Generate a cluster memory table. |
5 |
=A4.dup() |
Join up the cluster in-memory table to return a local in-memory table.
|
Description:
Copy a local in-memory table onto nodes to create a duplicate cluster in-memory table.
Syntax:
T.dup(h)
Note:
The function copies local in-memory table T onto node or node sequence h to create a duplicate cluster in-memory table. The memory footprints will be cleaned up once T.close() is executed.
Parameter:
T |
A local in-memory table |
h |
A node or a node sequence |
Return value:
A duplicate cluster in-memory table
Example:
|
A |
|
1 |
=demo.cursor("select EID,NAME,GENDER,SALARY from EMPLOYEE where EID<10") |
|
2 |
=A1.memory() |
Generate a local in-memory table. |
3 |
=A2.dup("169.254.121.62:8281","192.168.31.165:8281") |
Copy the local in-memory table into a duplicate cluster in-memory table. |