Iglu::IgluError (Not a self-describing JSON)


#1

i am using redshit.json file of iglu:com.snowplowanalytics.snowplow.storage/redshift_config/jsonschema/2-0-0
Below is the redshift.json file:

{
	"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
	"description": "Snowplow Redshift storage configuration",
	"self": {
		"vendor": "com.snowplowanalytics.snowplow.storage",
		"name": "redshift_config",
		"format": "jsonschema",
		"version": "2-0-0"
	},
	"type": "object",
	"properties": {
		"name": {
			"type": "AWS Redshift enriched events storage"
		},
		"host": {
			"type": "xxxx"
		},
		"database": {
			"type": "unilog"
		},
		"port": {
			"type": "5439",
			"minimum": 1,
			"maximum": 65535
		},
		"sslMode": {
			"type": "VERIFY_FULL",
			"enum": ["DISABLE", "REQUIRE", "VERIFY_CA", "VERIFY_FULL"]
		},
		"schema": {
			"type": "atomic"
		},
		"username": {
			"type": "unilog"
		},
		"password": {
			"type": "Unilog123"
		},
		"maxError": {
			"type": "5000",
			"minimum": 0,
			"maximum": 10000
		},
		"compRows": {
			"type": "500000",
			"minimum": 1000,
			"maximum": 1000000000
		},
		"roleArn": {
			"type": "xxxxxx",
			"minLength": 20
		},
		"id": {
			"type": "string",
			"format": "uuid"
		},
		"purpose": {
			"type": "StoreDatabase",
			"enum": ["ENRICHED_EVENTS"]
		}
	},
	"additionalProperties": false,
	"required": ["AWS Redshift enriched events storage", "xxxx", "unilog", "5439", "VERIFY_FULL", "atomic", "unilog", "Unilog123", "5000", "50000", "xxx", "StoreDatabase"]
}

when i run this using below command

 ./snowplow-emr-etl-runner run --config snowplow/4-storage/config/emretlrunner.yml --resolver snowplow/4-storage/config/iglu_resolver.json --targets snowplow/4-storage/config/targets/ --skip analyze

I am getting below error:

F, [2017-10-17T07:13:14.674000 #7249] FATAL -- :

Iglu::IgluError (Not a self-describing JSON):
	uri:classloader:/gems/iglu-ruby-client-0.1.0/lib/iglu-client/self_describing_json.rb:52:in `parse_json'
	uri:classloader:/emr-etl-runner/lib/snowplow-emr-etl-runner/runner.rb:178:in `block in validate_targets'
	org/jruby/RubyArray.java:2485:in `map'
	uri:classloader:/emr-etl-runner/lib/snowplow-emr-etl-runner/runner.rb:176:in `validate_targets'
	uri:classloader:/gems/contracts-0.11.0/lib/contracts/method_reference.rb:43:in `send_to'
	uri:classloader:/gems/contracts-0.11.0/lib/contracts/call_with.rb:76:in `call_with'
	uri:classloader:/gems/contracts-0.11.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
	uri:classloader:/emr-etl-runner/lib/snowplow-emr-etl-runner/runner.rb:44:in `initialize'
	uri:classloader:/gems/contracts-0.11.0/lib/contracts/method_reference.rb:43:in `send_to'
	uri:classloader:/gems/contracts-0.11.0/lib/contracts/call_with.rb:76:in `call_with'
	uri:classloader:/gems/contracts-0.11.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
	uri:classloader:/emr-etl-runner/bin/snowplow-emr-etl-runner:40:in `<main>'
	org/jruby/RubyKernel.java:979:in `load'
	uri:classloader:/META-INF/main.rb:1:in `<main>'
	org/jruby/RubyKernel.java:961:in `require'
	uri:classloader:/META-INF/main.rb:1:in `(root)'
	uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `<main>'

What is the mistake i am doing in the redshift.json file.


#2

You should be editing a file that looks like this rather than editing what you have above which is the JSON schema for the Redshift configuration JSON.


#3

Thanks @mike :slight_smile: it helped me alot