Kinetica C# API
Version 7.1.10.0
|
A set of parameters for Kinetica.insertRecordsFromFiles(string,IList{string},IDictionary{string, IDictionary{string, string}},IDictionary{string, string},IDictionary{string, string}). More...
Classes | |
struct | CreateTableOptions |
Options from /create/table, allowing the structure of the table to be defined independently of the data source, when creating the target table
More... | |
struct | Options |
Optional parameters. More... | |
Public Member Functions | |
InsertRecordsFromFilesRequest () | |
Constructs an InsertRecordsFromFilesRequest object with default parameters. More... | |
InsertRecordsFromFilesRequest (string table_name, IList< string > filepaths, IDictionary< string, IDictionary< string, string >> modify_columns=null, IDictionary< string, string > create_table_options=null, IDictionary< string, string > options=null) | |
Constructs an InsertRecordsFromFilesRequest object with the specified parameters. More... | |
![]() | |
KineticaData (KineticaType type) | |
Constructor from Kinetica Type More... | |
KineticaData (System.Type type=null) | |
Default constructor, with optional System.Type More... | |
object | Get (int fieldPos) |
Retrieve a specific property from this object More... | |
void | Put (int fieldPos, object fieldValue) |
Write a specific property to this object More... | |
Properties | |
string | table_name [get, set] |
Name of the table into which the data will be inserted, in [schema_name. More... | |
IList< string > | filepaths [get, set] |
A list of file paths from which data will be sourced; For paths in KiFS, use the uri prefix of kifs:// followed by the path to a file or directory. More... | |
IDictionary< string, IDictionary< string, string > > | modify_columns = new List<string>() [get, set] |
Not implemented yet. More... | |
IDictionary< string, string > | create_table_options = new Dictionary<string, IDictionary<string, string>>() [get, set] |
Options from /create/table, allowing the structure of the table to be defined independently of the data source, when creating the target table
More... | |
IDictionary< string, string > | options = new Dictionary<string, string>() [get, set] |
Optional parameters. More... | |
![]() | |
Schema | Schema [get] |
Avro Schema for this class More... | |
Additional Inherited Members | |
![]() | |
static RecordSchema | SchemaFromType (System.Type t, KineticaType ktype=null) |
Create an Avro Schema from a System.Type and a KineticaType. More... | |
A set of parameters for Kinetica.insertRecordsFromFiles(string,IList{string},IDictionary{string, IDictionary{string, string}},IDictionary{string, string},IDictionary{string, string}).
Reads from one or more files and inserts the data into a new or existing table. The source data can be located either in KiFS; on the cluster, accessible to the database; or remotely, accessible via a pre-defined external data source.
For delimited text files, there are two loading schemes: positional and name-based. The name-based loading scheme is enabled when the file has a header present and text_has_header is set to true. In this scheme, the source file(s) field names must match the target table's column names exactly; however, the source file can have more fields than the target table has columns. If error_handling is set to permissive, the source file can have fewer fields than the target table has columns. If the name-based loading scheme is being used, names matching the file header's names may be provided to columns_to_load instead of numbers, but ranges are not supported.
Note: Due to data being loaded in parallel, there is no insertion order guaranteed. For tables with primary keys, in the case of a primary key collision, this means it is indeterminate which record will be inserted first and remain, while the rest of the colliding key records are discarded.
Returns once all files are processed.
Definition at line 49 of file InsertRecordsFromFiles.cs.
|
inline |
Constructs an InsertRecordsFromFilesRequest object with default parameters.
Definition at line 3168 of file InsertRecordsFromFiles.cs.
|
inline |
Constructs an InsertRecordsFromFilesRequest object with the specified parameters.
table_name | Name of the table into which the data will be inserted, in [schema_name.]table_name format, using standard name resolution rules. If the table does not exist, the table will be created using either an existing type_id or the type inferred from the file, and the new table name will have to meet standard table naming criteria. |
filepaths | A list of file paths from which data will be sourced; For paths in KiFS, use the uri prefix of kifs:// followed by the path to a file or directory. File matching by prefix is supported, e.g. kifs://dir/file would match dir/file_1 and dir/file_2. When prefix matching is used, the path must start with a full, valid KiFS directory name. If an external data source is specified in datasource_name, these file paths must resolve to accessible files at that data source location. Prefix matching is supported. If the data source is hdfs, prefixes must be aligned with directories, i.e. partial file names will not match. If no data source is specified, the files are assumed to be local to the database and must all be accessible to the gpudb user, residing on the path (or relative to the path) specified by the external files directory in the Kinetica configuration file. Wildcards (*) can be used to specify a group of files. Prefix matching is supported, the prefixes must be aligned with directories. If the first path ends in .tsv, the text delimiter will be defaulted to a tab character. If the first path ends in .psv, the text delimiter will be defaulted to a pipe character (|). |
modify_columns | Not implemented yet. The default value is an empty Dictionary. |
create_table_options | Options from /create/table, allowing the structure of the table to be defined independently of the data source, when creating the target table
|
options | Optional parameters.
|
Definition at line 4204 of file InsertRecordsFromFiles.cs.
|
getset |
Options from /create/table, allowing the structure of the table to be defined independently of the data source, when creating the target table
NO_ERROR_IF_EXISTS: If true, prevents an error from occurring if the table already exists and is of the given type. If a table with the same name but a different type exists, it is still an error. Supported values:
The default value is FALSE. IS_REPLICATED: Affects the distribution scheme for the table's data. If true and the given table has no explicit shard key defined, the table will be replicated. If false, the table will be sharded according to the shard key specified in the given type_id, or randomly sharded, if no shard key is specified. Note that a type containing a shard key cannot be used to create a replicated table. Supported values:
The default value is FALSE. FOREIGN_KEYS: Semicolon-separated list of foreign keys, of the format '(source_column_name [, ...]) references target_table_name(primary_key_column_name [, ...]) [as foreign_key_name]'. FOREIGN_SHARD_KEY: Foreign shard key of the format 'source_column references shard_by_column from target_table(primary_key_column)'. PARTITION_TYPE: Partitioning scheme to use. Supported values:
PARTITION_KEYS: Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by partition_definitions. PARTITION_DEFINITIONS: Comma-separated list of partition definitions, whose format depends on the choice of partition_type. See range partitioning, interval partitioning, list partitioning, hash partitioning, or series partitioning for example formats. IS_AUTOMATIC_PARTITION: If true, a new partition will be created for values which don't fall into an existing partition. Currently, only supported for list partitions. Supported values:
The default value is FALSE. TTL: Sets the TTL of the table specified in . CHUNK_SIZE: Indicates the number of records per chunk to be used for this table. IS_RESULT_TABLE: Indicates whether the table is a memory-only table. A result table cannot contain columns with store_only or text_search data-handling or that are non-charN strings, and it will not be retained if the server is restarted. Supported values:
The default value is FALSE. STRATEGY_DEFINITION: The tier strategy for the table and its columns.
The default value is an empty Dictionary.
Definition at line 2384 of file InsertRecordsFromFiles.cs.
|
getset |
A list of file paths from which data will be sourced;
For paths in KiFS, use the uri prefix of kifs:// followed by the path to a file or directory.
File matching by prefix is supported, e.g. kifs://dir/file would match dir/file_1 and dir/file_2. When prefix matching is used, the path must start with a full, valid KiFS directory name.
If an external data source is specified in datasource_name, these file paths must resolve to accessible files at that data source location. Prefix matching is supported. If the data source is hdfs, prefixes must be aligned with directories, i.e. partial file names will not match.
If no data source is specified, the files are assumed to be local to the database and must all be accessible to the gpudb user, residing on the path (or relative to the path) specified by the external files directory in the Kinetica configuration file. Wildcards (*) can be used to specify a group of files. Prefix matching is supported, the prefixes must be aligned with directories.
If the first path ends in .tsv, the text delimiter will be defaulted to a tab character. If the first path ends in .psv, the text delimiter will be defaulted to a pipe character (|).
Definition at line 2147 of file InsertRecordsFromFiles.cs.
|
getset |
Not implemented yet.
The default value is an empty Dictionary.
Definition at line 2151 of file InsertRecordsFromFiles.cs.
|
getset |
Optional parameters.
The default value is an empty Dictionary.
Definition at line 3163 of file InsertRecordsFromFiles.cs.
|
getset |
Name of the table into which the data will be inserted, in [schema_name.
]table_name format, using standard name resolution rules. If the table does not exist, the table will be created using either an existing type_id or the type inferred from the file, and the new table name will have to meet standard table naming criteria.
Definition at line 2113 of file InsertRecordsFromFiles.cs.