Static deploy feature of igluctl

Has anyone tried the static deploy feature that comes with igluctl ? I’m having a problem getting it working for me. I copied a version of the configuration from here https://docs.snowplowanalytics.com/docs/pipeline-components-and-applications/iglu/igluctl-0-6-0/#static-deploy

However, after I tried it locally with igluctl 0.7.1, it’s giving me an error:
Configuration is invalid: InvalidData
which does not indicate which part of the configuration contain invalid data. Here is what I used:

{
    "$schema": "iglu:com.snowplowanalytics.iglu/igluctl_config/jsonschema/1-0-0",
    "description": "A config file"
    "data": {
        "input": "file://tmp/schemas",
        "lint": {
            "skipWarnings": true,
            "includedChecks": ["rootObject", "unknownFormats"]
        },
        "generate": {
            "output": "file://tmp/ddl_output",
            "withJsonPaths": true,
            "dbSchema": "randomschema",
            "varcharSize": 4096,
            "noHeader": true,
            "force": true,
            "owner": "a_new_owner"
        },
        "actions": [
            {
                "action": "push",
                "isPublic": false,
                "registry": "http://my-snowplow-mini-instance-ec2.com/iglu-server",
                "apikey": "c88901aa-c60e-4141-8bb4-3bfacfe61007"
            }
        ]
    }
}

What could be wrong with this? Can anyone help?

@ablimit, I suspect the issue is with the location of your JSON schemas. You specified it as “file://tmp/schemas”. I would assume Igluctl cannot locate your schemas and hence the error “Configuration is invalid: InvalidData”. If I’m not mistaken the input should contain the (absolute or relative) path to your local JSON schema repository (no need for file:// prefix either).

@ihor Thanks for helping out. I don’t think that’s the case. I tried several variations (relative path, absolute path, and with URI prefix). They are all giving the same error message.

Also tried this very wrong version in a hope to get a different error message:

{
    "$schema": "iglu:com.snowplowanalytics.iglu/igluctl_config/jsonschema/1-0-0",
    "data": {
        "lint": {
            "skipWarnings": true,
            "includedChecks": ["rootObject", "unknownFormats"]
        }
    }
}

The error message is the same. Thus, I feel like the binary is complaining about the file format. Am I missing any fields that I didn’t know ?

@ablimit, what is the local path to your JSON schemas (including the folders after the “root” folder schemas)? How does your JSON schema(s) look like? Have you tried to run just lint command on its own (not as part of static deploy)?

Mentioning just in case, the JSON schemas are expected to be located in the path schemas/<vendor>/<name>/jsonschema/<version>, where <version> is the actual name of the file (not the name of the folder). Thus, when running lint it could look like

$ /path/to/igluctl lint /path/to/schema/registry/schemas/com.example_company/example_event/jsonschema/1-0-0

If you are getting the same error then the problem is with the actual JSON schema. Could you share that schema to take a look at?

Hi @ablimit,

Sorry for the very late response. The problem is that you use $schema keyword, while it should be just schema as in any other self-describing JSON. description also seems redundant.

1 Like