create_temp_table: create_temp_table (deprecated)

View source: R/db_commands.R

create_temp_tableR Documentation

create_temp_table (deprecated)

Description

A convenience function to match dbtools which creates a table in the user's temporary database. Please now use dbExecute() directly instead, e.g. with variables conn, table_name and sql then run: ⁠dbExecute(conn, glue("CREATE TABLE __temp__.{table_name} as {sql}")⁠)

Usage

create_temp_table(sql, table_name, conn = NULL)

Arguments

sql

A sql command which generates a table to be created in the temporary location.

table_name

The name of the table to be created in the user's temporary database.

conn

(optional) A DBIConnection object, as returned by connect_athena(). If unused then the query will create its own connection and close it subsequently. Note that if you choose not to supply this argument then you may find you cannot access the table later with a different connection.


moj-analytical-services/Rdbtools documentation built on June 22, 2024, 8:46 p.m.