Create Join Table
Creates a table that is the result of a SQL JOIN. For details see: join concept documentation.
Name |
Type |
Description |
join_table_name |
string |
Name of the join table to be created. Has the same naming restrictions as tables. |
table_names |
array
of
strings |
The list of table names composing the join. Corresponds to a SQL statement FROM clause Default value is an empty array ( [] ). |
column_names |
array
of
strings |
List of member table columns or column expressions to be included in the join. Columns can be prefixed with 'table_id.column_name', where 'table_id' is the table name or alias. Columns can be aliased via the syntax 'column_name as alias'. Wild cards '*' can be used to include all columns across member tables or
'table_id.*' for all of a single table's columns. Columns and column expressions comprising the join must be uniquely named or aliased--therefore, the '*' wild card cannot be used if column names aren't unique across all tables. Default value is an empty array ( [] ). |
expressions |
array
of
strings |
An optional list of expressions to combine and filter the joined tables. Corresponds to a SQL statement WHERE clause. For details see: expressions. Default value is an empty array ( [] ). |
options |
map of
strings |
Optional parameters. Default value is an empty map ( {} ).
Supported Parameters
(keys) |
Parameter Description |
collection_name |
Name of a collection which is to contain the join. If the collection provided is non-existent, the collection will be automatically created. If empty, then the join will be at the top level. Default value is ''. |
max_query_dimensions |
The maximum number of tables in a join that can be accessed by a query and are not equated by a foreign-key to primary-key equality predicate |
optimize_lookups |
Use more memory to speed up the joining of tables. Default value is 'false'. The allowed values are:
|
refresh_method |
Method by which the join can be refreshed when the data in 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 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. |
|
ttl |
Sets the TTL of the table specified in input parameter join_table_name. The value must be the desired TTL in minutes. |
|
Name |
Type |
Description |
join_table_name |
string |
Value of input parameter
join_table_name. |
count |
long |
The number of records in the join table
filtered by the given select expression. |