0

Case:
I have csv data extract to be loaded with a great COPY INTO and also have a csv file with table description.
I want to create table from this description file before loading data.
Q:Is it possible to create a table by using description file?
I looked at 'CREATE TABLE mytable FROM LOADER myloader();' example but it does not seem support additional attributes to define columns.
One solution I know is to create a Python function to parse file and generate ddl statement but was curios if it can be done easier way.
Idea for enhancement: COPY INTO would be expanded to support creating tables at the same time by adding description file as another parameter.

Alex O
  • 1
  • 1

1 Answers1

0

Unfortunately, this is not currently possible.

The problem from my experience with implementing this kind of convenience feature is that it would be difficult to define a syntax that:

  1. is backward compatible so that it does not break existing code
  2. convenient for a majority of users
  3. simple enough to implement