class NexosisApi::ImportsResponse
class to parse results from an imports call
Attributes
The column descriptors for the data in this session
will reflect either the metadata sent in, defaults form dataset, or inferred values
@return[Array of NexosisApi::Column]
echo back the name of the data source uploaded @return [String] @since 1.3.0
The unique identifier for this import request @return [String]
associated hypermedia @return [Array of NexosisApi::Link]
Additional details. Normally empty. @return [Array]
The S3 parameters used to import a dataset @return [Hash] For an S3 response the keys of this hash should be 'bucket', 'path', and 'region'
The date of the import request @return [DateTime]
Where the import was requested from - S3, Azure, or Url @return [String]
The current status of the import request @return [String] @note The import will be performed in a FIFO queue. Check back on status before attempting to start a session using the dataset.
Date and status of each status this session has entered @return [Hash] @since 1.3.0
Where the import was requested from - S3, Azure, or Url @return [String]
Public Class Methods
# File lib/nexosis_api/imports_response.rb, line 4 def initialize(response_hash) response_hash.each do |k, v| if(k == 'importId') @import_id = v elsif(k == 'requestedDate') @requested_date = v elsif(k == 'columns') columns = [] next if v.nil? v.keys.each do |col_key| columns << NexosisApi::Column.new(col_key, v[col_key]) end @column_metadata = columns elsif(k == 'links') links = [] v.each { |l| links << NexosisApi::Link.new(l) } instance_variable_set("@#{k}", links) unless v.nil? elsif k == 'dataSetName' @datasource_name = v else instance_variable_set("@#{k}", v) unless v.nil? end end end