READ_CSV (inference)
Deprecated version
This document refers to a deprecated version of the RQL programming language.
Please go here for documentation related to the latest supported version.
Reads CSV data from a location.
Syntax
READ_CSV(location,
encoding := null,
has_header := null,
delimiters := [","],
nulls := [],
nans := [],
skip := 0,
escape := "\\",
quotes := ["\""],
quote := null,
sample_size := 10000,
cache := <default interval>,
retries := <default int>,
retry_interval := <default interval>,
http_method := "get",
http_body := null,
http_body_string := null,
http_headers := [],
http_args := [],
http_auth_cred_name := null,
http_token := null,
http_token_url := null,
http_client_id := null,
http_client_secret := null,
http_renew_token_use_basic_auth := false,
http_username := null,
http_password := null)
- The optional argument encoding specifies the encoding of the data; if the encoding is set to null, it will be
determined automatically; otherwise, refer to :ref:
encodings <encodings>
. - The optional argument has_header specifies whether the data has a header or not, e.g.
true
orfalse
; if the field is not specified, the inference will try to detect the presence of a header. - The optional argument skip specifies the number of lines to skip in the data; if the field is not specified it will default to 0 (read and infer from the start of the file).
- The optional argument delimiters specifies a candidate list of delimiters, e.g.
[",", "|"]
; if the field is not specified, the inference will try to detect the delimiter. - The optional argument nulls specifies a candidate list of strings to interpret as null, e.g.
["NA"]
; if the field is not specified, the inference will not detect nulls. - The optional argument nans specifies a candidate list of strings to interpret as NaN, e.g.
["nan"]
; if the field is not specified, the inference will not detect NaNs. - The optional argument quotes specifies a candidate list of quote characters to interpret as quotes, e.g.
["\""]
; if the field is not specified, the inference will try to detect the quote char, if the value is set tonull
then no quote char will be used. - The optional argument quote is an alternative to quotes for a single candidate;
- The optional argument escape specifies a escape character while parsing the CSV file, e.g.
"\\"
; the default value is\
, if the value is set tonull
or empty string then no escape char will be used. - The optional arguments starting with http, like http_method, define specific http request options; refer to :ref:
HTTP Optional Arguments <http_optional_args>
.