create_join_table
GPUdb.create_join_table( join_table_name = None, table_names = None, aliases =
None, expression = '', expressions = [], options =
{} )
Creates a table that is the result of a SQL JOIN. For details see: join concept documentation.
Name |
Type |
Description |
join_table_name |
str |
Name of the join table to be created. Must not be the name of a currently existing GPUdb table or join table. Cannot be an empty string. |
table_names |
list
of
str |
The list of table names making up the joined set. Corresponds to a SQL statement FROM clause |
aliases |
list
of
str |
The list of aliases for each of the corresponding tables. |
expression |
str |
An optional expression GPUdb uses to combine and filter the joined set. Corresponds to a SQL statement WHERE clause. For details see: expressions. Default value is ''. |
expressions |
list
of
str |
An optional list of expressions GPUdb uses to combine and filter the joined set. Corresponds to a SQL statement WHERE clause. For details see: expressions. Default value is an empty list ( [] ). |
options |
dict
of
str |
Optional parameters. Default value is an empty dict ( {} ).
Supported Parameters
(keys) |
Parameter Description |
collection_name |
Name of a collection in GPUdb to which the join table is to be assigned as a child table. If empty, then the join table will be a top level table. Default value is ''. |
max_query_dimensions |
The maximum number of tables in a joined table that can be accessed by a query and are not equated by a foreign-key to primary-key equality predicate |
optimize_lookups |
Use the applied filters to precalculate the lookup table to get data from the primary key sets |
refresh_method |
Method by which the join table can be refreshed when underlying member tables have changed. Default value is 'manual'.
Supported
Values |
Description |
manual |
refresh only occurs when manually requested by calling this endpoint with refresh option set to 'refresh' or 'full_refresh' |
on_query |
incrementally refresh (refresh just those records added) whenever a new query is issued and new data is inserted into the base table. A full refresh of all the records occurs when a new query is issued and there have been inserts to any non-base-tables since the last query |
on_insert |
incrementally refresh (refresh just those records added) whenever new data is inserted into a base table. A full refresh of all the records occurs when a new query is issued and there have been inserts to any non-base-tables since the last query |
|
refresh |
Do a manual refresh of the join table if it exists - throws an error otherwise Default value is 'no_refresh'.
Supported
Values |
Description |
no_refresh |
don't refresh |
refresh |
incrementally refresh (refresh just those records added) if new data has been inserted into the base table. A full refresh of all the records occurs if there have been inserts to any non-base-tables since the last refresh |
full_refresh |
always refresh even if no new records have been added. Only refresh method guaranteed to do a full refresh (refresh all the records) if a delete or update has occurred since the last refresh. |
|
|
Name |
Type |
Description |
join_table_name |
str |
Value of input parameter join_table_name. |
count |
long |
The number of records in the join table
filtered by the given select expression. |