Closed austinweisgrau closed 7 months ago
Actually this behavior is supposed to exist with parsons.databases.redshift.rs_create_table.generate_data_types(), investigating why its not working for me in a certain instance...
Closing this issue in favor of the more precise https://github.com/move-coop/parsons/issues/942
By default,
parsons.databases.redshift.copy()
makes all column types VARCHAR in redshift. It is possible to pass acolumntypes
dictionary mapping argument to explicitly set column types, but this method should be able to infer column types from theparsons.Table
input if nocolumntypes
are explicitly provided.This behavior is built in to the new
parsons.google.bigquery.BigQuery.copy()
method (see here) and should be available for copying into redshift as well.Detailed Description
Context
Creating all column types as VARCHAR is more naive than is necessary, the source parsons Table has information available about column types and those should be used to create column types in Redshift as well.
Possible Implementation
Should be able to closely match the behavior of this method for bigquery, with changes for Redshift compatibility.
Priority