• blds
  • building
  • development
  • driveway
  • electrical
  • + 8

Query the Data Delivery Network

Query the DDN

The easiest way to query any data on Splitgraph is via the "Data Delivery Network" (DDN). The DDN is a single endpoint that speaks the PostgreSQL wire procotol. Any Splitgraph user can connect to it at and query any version of over 40,000 datasets that are hosted or proxied by Splitgraph.

For example, you can query the issued_construction_permits table in this repository, by referencing it like:


or in a full query, like:

    ":id", -- Socrata column ID
    "contractor_city", -- Contractor city
    "total_lot_sq_ft", -- The total square footage attributed to the lot size.
    "calendar_year_issued", -- Calendar Year corresponding to when the Permit was issued
    "certificate_of_occupancy", -- Yes or No field to specify if the Certificate of Occupancy was required for this permit. This information applies only to Building Permits. 
    "masterpermitnum", -- If the permit is listed as the child of another permit, this is the Project ID of that parent permit.  A building permit's (BP) master permit number will reference the Plan Review Project ID, while trades under that BP will reference the BP's ID as their master.  This may also be called the "parent folderRSN".
    "project_id", -- ID associated with the permit within the database.  Also referred to as the FolderRSN.
    "day_issued", -- Day of the week the permit was issued
    "contractor_zip", -- Contractor zip
    "jurisdiction", -- Jurisdiction of permit property
    "contractor_address1", -- Contractor street address line 1
    "contractor_address2", -- Contractor street address line 2
    "applicant_org", -- Organization the applicant is associated with.
    "original_address1", -- Property address associated with the permit
    "applicant_address2", -- Applicant address line 2
    "applicantzip", -- Applicant zip code
    "permit_type_desc", -- Description of the Permit Type
    "legal_description", -- Legal Description of the property associated with the permit.
    "total_valuation_remodel", -- Total dollar valuation for remodeling aspects of the job
    "issued_in_last_30_days", -- Yes/No value to indicate if the permit was issued in the last 30 days.  This field is evaluated using the last date that the data was refreshed.
    "expiresdate", -- Date on which the permit will/would have expire(d)
    "permit_class_mapped", -- Indicates if the permit is intended for Residential or Commercial.  This mapping is derived from the PermitClass field (if the Class starts with "R", it is residential, otherwise it is commercial)
    "contractor_company_name", -- Company name of the primary contractor associated with the permit.
    "contractor_full_name", -- Full name of the contractor
    "contractor_phone", -- Contractor phone number
    "permit_class", -- Sub Type of the permit
    "work_class", -- Work type of the permit
    "permit_number", -- Permit number
    "description", -- Detailed description of work permitted
    "applicant_phone", -- Applicant phone
    "total_job_valuation", -- Total dollar valuation for entire job for each building permit (e.g. will include Building, Electrical, Mechanical, and Plumbing valuations, but not other Building Permits in the same project)
    "tcad_id", -- TCAD_ID aligns with the Geographic ID field on the website when performing a property search.
    "statusdate", -- Indicates the last time the status or ExpiresDate of a permit was updated in the AMANDA database.
    "issue_date", -- Date on which the permit was issued
    "applicant_full_name", -- Full name of the applicant
    "status_current", -- Current status of permit
    "completed_date", -- Date on which the permit was completed
    "applicant_address1", -- Applicant address line 1
    "original_city", -- City of the property associated with the permit
    "contractor_trade", -- Indicates contractor trade.
    "fiscal_year_issued", -- Fiscal Year corresponding to when the permit was issued
    "council_district", -- Council District associated with the permit property location
    "permittype", -- Raw values indicating type of permit in abbreviated format
    "housing_units", -- Number of household units for a given building
    "applieddate", -- Date on which the permit was applied.  This relates to the original Plan Review application submission where applicable.
    "issue_method", -- Permit issuance method.  "Permit Center" represents any permit which a permit center technician manually issued (e.g., will include fax based requests).  "Online" includes permits issued through the website including Austin Build and Connect or Customer Self Assignment.
    "applicant_city" -- Applicant city
LIMIT 100;

Connecting to the DDN is easy. All you need is an existing SQL client that can connect to Postgres. As long as you have a SQL client ready, you'll be able to query austintexas-gov/issued-construction-permits-3syk-w9eu with SQL in under 60 seconds.

This repository is an "external" repository. That means it's hosted elsewhere, in this case at When you queryaustintexas-gov/issued-construction-permits-3syk-w9eu:latest on the DDN, we "mount" the repository using the socrata mount handler. The mount handler proxies your SQL query to the upstream data source, translating it from SQL to the relevant language (in this case SoQL).

We also cache query responses on the DDN, but we run the DDN on multiple nodes so a CACHE_HIT is only guaranteed for subsequent queries that land on the same node.

Query Your Local Engine

Install Splitgraph Locally
bash -c "$(curl -sL"

Splitgraph Cloud is built around Splitgraph Core (GitHub), which includes a local Splitgraph Engine packaged as a Docker image. Splitgraph Cloud is basically a scaled-up version of that local Engine. When you query the Data Delivery Network or the REST API, we mount the relevant datasets in an Engine on our servers and execute your query on it.

It's possible to run this engine locally. You'll need a Mac, Windows or Linux system to install sgr, and a Docker installation to run the engine. You don't need to know how to actually use Docker; sgrcan manage the image, container and volume for you.

There are a few ways to ingest data into the local engine.

For external repositories (like this repository), the Splitgraph Engine can "mount" upstream data sources by using sgr mount. This feature is built around Postgres Foreign Data Wrappers (FDW). You can write custom "mount handlers" for any upstream data source. For an example, we blogged about making a custom mount handler for HackerNews stories.

For hosted datasets, where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr cloneand sgr checkout.

Mounting Data

This repository is an external repository. It's not hosted by Splitgraph. It is hosted by, and Splitgraph indexes it. This means it is not an actual Splitgraph image, so you cannot use sgr clone to get the data. Instead, you can use the socrata adapter with the sgr mount command. Then, if you want, you can import the data and turn it into a Splitgraph image that others can clone.

First, install Splitgraph if you haven't already.

Mount the table with sgr mount

sgr mount socrata \
  "austintexas-gov/issued-construction-permits-3syk-w9eu" \
  --handler-options '{
    "domain": "",
    "tables": {
        "issued_construction_permits": "3syk-w9eu"

That's it! Now you can query the data in the mounted table like any other Postgres table.

Query the data with your existing tools

Once you've loaded the data into your local Splitgraph engine, you can query it with any of your existing tools. As far as they're concerned, austintexas-gov/issued-construction-permits-3syk-w9eu is just another Postgres schema.

Related Documentation: