COPY subquery INTO file_name - INCLUDE field name
Hi! We are using the COPY *subquery* INTO *file_name *[ [USING] DELIMITERS *field_separator* [',' *record_separator* [ ',' *string_quot*e ]]] [ NULL AS *null_string* ] BUT we need to have in the file the name of the fields on the first row. Im looking on the documentation, but I cannot find anything related to this, can someone help me with this? Thks in advance!
On 31 Oct 2016, at 18:42, Ariel Abadi
wrote: Hi! We are using the COPY subquery INTO file_name [ [USING] DELIMITERS field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS null_string ]
BUT we need to have in the file the name of the fields on the first row.
Hai Ariel, Is this what you’re looking for: https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/LoadingBulkData "Often CSV files contain header information that is not part of the actual data. This header information can be skipped by using the form COPY n OFFSET m RECORDS INTO table FROM 'file'; Here n is the number of records to insert and m is the first record to be inserted where the first record in the file is called 1 (i.e. counting is 1 based).” Regards, Jennie
Im looking on the documentation, but I cannot find anything related to this, can someone help me with this?
Thks in advance!
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Hi Jennie,
What Ariel is asking is about "COPY INTO FILE", and you refer to "COPY INTO
TABLE"
Regards.
2016-11-09 0:08 GMT-03:00 Ying Zhang
On 31 Oct 2016, at 18:42, Ariel Abadi
wrote: Hi! We are using the COPY subquery INTO file_name [ [USING] DELIMITERS field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS null_string ]
BUT we need to have in the file the name of the fields on the first row.
Hai Ariel,
Is this what you’re looking for:
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/LoadingBulkData
"Often CSV files contain header information that is not part of the actual data. This header information can be skipped by using the form
COPY n OFFSET m RECORDS INTO table FROM 'file';
Here n is the number of records to insert and m is the first record to be inserted where the first record in the file is called 1 (i.e. counting is 1 based).”
Regards, Jennie
Im looking on the documentation, but I cannot find anything related to
this, can someone help me with this?
Thks in advance!
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
On 9 Nov 2016, at 13:23, Alberto Ferrari
wrote: Hi Jennie, What Ariel is asking is about "COPY INTO FILE", and you refer to "COPY INTO TABLE”
Oeps, sorry. You’re right. Then I’m afraid this feature is not implemented yet in MonetDB. If necessary, please file a feature request. This calls for something like: WITH CSV HEADER, or FORMAT CSV WITH HEADER Regards, Jennie
Regards.
2016-11-09 0:08 GMT-03:00 Ying Zhang
: On 31 Oct 2016, at 18:42, Ariel Abadi
wrote: Hi! We are using the COPY subquery INTO file_name [ [USING] DELIMITERS field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS null_string ]
BUT we need to have in the file the name of the fields on the first row.
Hai Ariel,
Is this what you’re looking for:
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/LoadingBulkData
"Often CSV files contain header information that is not part of the actual data. This header information can be skipped by using the form
COPY n OFFSET m RECORDS INTO table FROM 'file';
Here n is the number of records to insert and m is the first record to be inserted where the first record in the file is called 1 (i.e. counting is 1 based).”
Regards, Jennie
Im looking on the documentation, but I cannot find anything related to this, can someone help me with this?
Thks in advance!
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (3)
-
Alberto Ferrari
-
Ariel Abadi
-
Ying Zhang