0

I try to use flywayDB opensource - migrate function and try to create table from CSV file but I get ERROR :

Migration V1__Add_new_tables.sql failed
---------------------------------------
SQL State  : 42883
Error Code : 0
Message    : ERROR: function csvread(unknown) does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 48
Location   : /Users/maayanezra/Downloads/flyway-5.1.4/sql/V1__Add_new_tables.sql (/Users/maayanezra/Downloads/flyway-5.1.4/sql/V1__Add_new_tables.sql)
Line       : 64
Statement  : CREATE TABLE public.mutations AS SELECT * FROM CSVREAD('mutation.csv')

when I try to upload this :

CREATE TABLE public.mutations
(
    id integer,
    gene_id integer,
    name text COLLATE pg_catalog."default",
    ...
) as select * from CSVREAD ('mutation.csv');
  • use [code block](http://stackoverflow.com/editing-help) to display your code and quote for error message. – Circle Hsiao Jul 10 '18 at 07:10
  • the ERROR :Migration V1__Add_new_tables.sql failed --------------------------------------- SQL State : 42883 Error Code : 0 Message : ERROR: function csvread(unknown) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 48 Location : /Users/maayanezra/Downloads/flyway-5.1.4/sql/V1__Add_new_tables.sql (/Users/maayanezra/Downloads/flyway-5.1.4/sql/V1__Add_new_tables.sql) Line : 64 Statement : CREATE TABLE public.mutations AS SELECT * FROM CSVREAD('mutation.csv') – Maayan Ezra Jul 10 '18 at 07:23
  • what I try to upload : CREATE TABLE public.mutations ( id integer, gene_id integer, ..... ) as select * from CSVREAD ('mutation.csv'); – Maayan Ezra Jul 10 '18 at 07:23

0 Answers0