Class: Rafflesia::DatasetValidateData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::DatasetValidateData
- Defined in:
- lib/rafflesia/datasets/dataset_validate_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ checked_artifact_count: :checked_artifact_count, dataset_name: :dataset_name, dataset_version: :dataset_version, expected_row_count: :expected_row_count, failure_count: :failure_count, is_valid: :is_valid, issue_count: :issue_count, issues: :issues, manifest: :manifest, manifest_path: :manifest_path, manifest_sha256: :manifest_sha_256, row_count: :row_count, row_count_checked: :row_count_checked, selected_tables: :selected_tables, source: :source, structure_checks: :structure_checks, structure_count: :structure_count, table_artifact_count: :table_artifact_count, table_checks: :table_checks }.freeze
Instance Attribute Summary collapse
-
#checked_artifact_count ⇒ Object
Returns the value of attribute checked_artifact_count.
-
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
-
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
-
#expected_row_count ⇒ Object
Returns the value of attribute expected_row_count.
-
#failure_count ⇒ Object
Returns the value of attribute failure_count.
-
#is_valid ⇒ Object
Returns the value of attribute is_valid.
-
#issue_count ⇒ Object
Returns the value of attribute issue_count.
-
#issues ⇒ Object
Returns the value of attribute issues.
-
#manifest ⇒ Object
Returns the value of attribute manifest.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#manifest_sha_256 ⇒ Object
Returns the value of attribute manifest_sha_256.
-
#row_count ⇒ Object
Returns the value of attribute row_count.
-
#row_count_checked ⇒ Object
Returns the value of attribute row_count_checked.
-
#selected_tables ⇒ Object
Returns the value of attribute selected_tables.
-
#source ⇒ Object
Returns the value of attribute source.
-
#structure_checks ⇒ Object
Returns the value of attribute structure_checks.
-
#structure_count ⇒ Object
Returns the value of attribute structure_count.
-
#table_artifact_count ⇒ Object
Returns the value of attribute table_artifact_count.
-
#table_checks ⇒ Object
Returns the value of attribute table_checks.
Instance Method Summary collapse
-
#initialize(json) ⇒ DatasetValidateData
constructor
A new instance of DatasetValidateData.
Constructor Details
#initialize(json) ⇒ DatasetValidateData
Returns a new instance of DatasetValidateData.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 51 def initialize(json) super() hash = self.class.normalize(json) @checked_artifact_count = hash[:checked_artifact_count] @dataset_name = hash[:dataset_name] @dataset_version = hash[:dataset_version] @expected_row_count = hash[:expected_row_count] @failure_count = hash[:failure_count] @is_valid = hash[:is_valid] @issue_count = hash[:issue_count] @issues = (hash[:issues] || []).map { |item| item ? Rafflesia::DatasetValidationIssue.new(item) : nil } @manifest = hash[:manifest] ? Rafflesia::DatasetManifest.new(hash[:manifest]) : nil @manifest_path = hash[:manifest_path] @manifest_sha_256 = hash[:manifest_sha256] @row_count = hash[:row_count] @row_count_checked = hash[:row_count_checked] @selected_tables = (hash[:selected_tables] || []) @source = hash[:source] @structure_checks = (hash[:structure_checks] || []).map { |item| item ? Rafflesia::DatasetStructureCheck.new(item) : nil } @structure_count = hash[:structure_count] @table_artifact_count = hash[:table_artifact_count] @table_checks = (hash[:table_checks] || []).map { |item| item ? Rafflesia::DatasetTableCheck.new(item) : nil } end |
Instance Attribute Details
#checked_artifact_count ⇒ Object
Returns the value of attribute checked_artifact_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def checked_artifact_count @checked_artifact_count end |
#dataset_name ⇒ Object
Returns the value of attribute dataset_name.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def dataset_name @dataset_name end |
#dataset_version ⇒ Object
Returns the value of attribute dataset_version.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def dataset_version @dataset_version end |
#expected_row_count ⇒ Object
Returns the value of attribute expected_row_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def expected_row_count @expected_row_count end |
#failure_count ⇒ Object
Returns the value of attribute failure_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def failure_count @failure_count end |
#is_valid ⇒ Object
Returns the value of attribute is_valid.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def is_valid @is_valid end |
#issue_count ⇒ Object
Returns the value of attribute issue_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def issue_count @issue_count end |
#issues ⇒ Object
Returns the value of attribute issues.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def issues @issues end |
#manifest ⇒ Object
Returns the value of attribute manifest.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def manifest @manifest end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def manifest_path @manifest_path end |
#manifest_sha_256 ⇒ Object
Returns the value of attribute manifest_sha_256.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def manifest_sha_256 @manifest_sha_256 end |
#row_count ⇒ Object
Returns the value of attribute row_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def row_count @row_count end |
#row_count_checked ⇒ Object
Returns the value of attribute row_count_checked.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def row_count_checked @row_count_checked end |
#selected_tables ⇒ Object
Returns the value of attribute selected_tables.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def selected_tables @selected_tables end |
#source ⇒ Object
Returns the value of attribute source.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def source @source end |
#structure_checks ⇒ Object
Returns the value of attribute structure_checks.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def structure_checks @structure_checks end |
#structure_count ⇒ Object
Returns the value of attribute structure_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def structure_count @structure_count end |
#table_artifact_count ⇒ Object
Returns the value of attribute table_artifact_count.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def table_artifact_count @table_artifact_count end |
#table_checks ⇒ Object
Returns the value of attribute table_checks.
30 31 32 |
# File 'lib/rafflesia/datasets/dataset_validate_data.rb', line 30 def table_checks @table_checks end |