GithubHelp home page GithubHelp logo

bid-projects's People

Contributors

jlegind avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bid-projects's Issues

Querying the GBIF registry postgres DB for BID IDs

This piece of SQL will retrieve all datasets where the EML(xml) file contains a project ID that begins with the string 'BID'.

SELECT (xpath('./dataset/project/@id', t1.eml))[1]::text AS eml, t1.dk, t1.dataset_title, t1.publisher FROM
The xpath object navigates the xml hierarchy, returns an array and must be cast as text
(
SELECT convert_from(m.content, 'LATIN1')::xml AS eml, d.key AS dk, d.title as dataset_title, o.title AS
The metadata content field is assumed to be LATIN1 and converted to the DB encoding. Otherwise UTF8 breaking characters will trip up the query.
publisher FROM node
JOIN organization o ON node.key = o.endorsing_node_key
JOIN dataset d ON o.key = d.publishing_organization_key
JOIN metadata m ON d.key = m.dataset_key WHERE
d.deleted IS NULL AND encode(m.content, 'escape') !~ '^\357\273\277|^\377\376'
Regex ignores xml with BOM and UTF16LE BOM
)t1
WHERE trim((xpath('./dataset/project/@id', t1.eml))[1]::text) LIKE '%BID%'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.