Skip to content

Unable to create an external dataset, using Python #45

@DLakin01

Description

@DLakin01

I'm working on automating more of USAID's uploads to its Development Data Library via the Socrata API, and I'm getting stuck when trying to create one or more external datasets (with a link to data on another site, no actual data uploaded). For a given dataset entity, I'm trying to set the external url in accessPoints and metadata:additionalAccessPoints:urls, but the link does not appear after creation in Socrata.

Code:

(ok, revision) = Socrata(self.auth_obj).new({
                "name": dataset["name"],
                "description": dataset["description"],
                "accessPoints": {
                    dataset["type"]: dataset["url"]
                }
            })

................

if "url" in dataset:
            metadata["metadata"]["additionalAccessPoints"] = [{
                "urls": {
                    dataset["type"]: dataset["url"]
                }
            }]

  r = push_metadata(ds_fourfour, self.link, self.username, self.password, metadata, '1')

  r = apply_revision(ds_fourfour, self.link, self.username, self.password, '1')

Any tips?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions