usaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat
Icon for Socrata external plugin

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 protocol. Any Splitgraph user can connect to it at data.splitgraph.com:5432 and query any version of over 40,000 datasets that are hosted or proxied by Splitgraph.

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

"usaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat:latest"."baseline_study_of_food_for_peace_title_ii"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "h602_21", -- Goats do you own
    "asset_rental_final_30", -- Daily per capita rental equivalent 2013 UGX Other what
    "asset_rental_final_29", -- Daily per capita rental equivalent 2013 UGX Other household assets
    "asset_rental_final_28", -- Daily per capita rental equivalent 2013 UGX Mosquito nets
    "asset_rental_final_25", -- Daily per capita rental equivalent 2013 UGX Donkeys
    "asset_rental_final_23", -- Daily per capita rental equivalent 2013 UGX Pigs
    "asset_rental_final_22", -- Daily per capita rental equivalent 2013 UGX Cattle
    "asset_rental_final_20", -- Daily per capita rental equivalent 2013 UGX Goats
    "asset_rental_final_19", -- Daily per capita rental equivalent 2013 UGX Agricultural equipment
    "asset_rental_final_18", -- Daily per capita rental equivalent 2013 UGX Other electronic equipment
    "asset_rental_final_16", -- Daily per capita rental equivalent 2013 UGX Computers
    "asset_rental_final_14", -- Daily per capita rental equivalent 2013 UGX Jewelry and watches
    "asset_rental_final_12", -- Daily per capita rental equivalent 2013 UGX Boats
    "asset_rental_final_10", -- Daily per capita rental equivalent 2013 UGX Motor cycles
    "asset_rental_final_9", -- Daily per capita rental equivalent 2013 UGX Bicycles
    "asset_rental_final_8", -- Daily per capita rental equivalent 2013 UGX Solar panel electric inverters
    "asset_rental_final_7", -- Daily per capita rental equivalent 2013 UGX Generators
    "asset_rental_final_6", -- Daily per capita rental equivalent 2013 UGX Radio cassette
    "asset_rental_final_4", -- Daily per capita rental equivalent 2013 UGX Household appliances
    "asset_rental_final_3", -- Daily per capita rental equivalent 2013 UGX Furniture Furnishings
    "occasional_total", -- Total occasional expenditures Daily per capita in 2013 UGX
    "occasional_39", -- Daily per capita consumption 2013 UGX Other annual non consumption expenditures what
    "occasional_38", -- Daily per capita consumption 2013 UGX Animal sales letter market fee
    "occasional_37", -- Daily per capita consumption 2013 UGX Dowry and or debt payments
    "occasional_34", -- Daily per capita consumption 2013 UGX Remittances gifts and other transfers
    "occasional_33", -- Daily per capita consumption 2013 UGX Insurance premiums
    "occasional_31", -- Daily per capita consumption 2013 UGX User fees and charges
    "occasional_30", -- Daily per capita consumption 2013 UGX Property rates taxes
    "occasional_28", -- Daily per capita consumption 2013 UGX Other services nes
    "occasional_27", -- Daily per capita consumption 2013 UGX Expenditures on agricultural services
    "occasional_26", -- Daily per capita consumption 2013 UGX Expenditures on household services
    "occasional_21", -- Daily per capita consumption 2013 UGX Enamel and metallic utensils
    "occasional_20", -- Daily per capita consumption 2013 UGX Plastics
    "occasional_18", -- Daily per capita consumption 2013 UGX Other equipment and repairs
    "occasional_16", -- Daily per capita consumption 2013 UGX Agricultural tools
    "occasional_15", -- Daily per capita consumption 2013 UGX Phone handsets
    "occasional_14", -- Daily per capita consumption 2013 UGX Computers for household use
    "occasional_13", -- Daily per capita consumption 2013 UGX Radio
    "occasional_12", -- Daily per capita consumption 2013 UGX Transport equipment bicycles motor cycles motors etc
    "occasional_11", -- Daily per capita consumption 2013 UGX Electronic appliances or equipment
    "occasional_4", -- Daily per capita consumption 2013 UGX Footwear
    "occasional_3", -- Daily per capita consumption 2013 UGX Tailoring and materials
    "occasional_2", -- Daily per capita consumption 2013 UGX Other clothing and clothing materials
    "occasional_1", -- Daily per capita consumption 2013 UGX Clothing mens womens childrens
    "usual_32", -- Daily per capita consumption 2013 UGX Other monthly expenditures what
    "usual_31", -- Daily per capita consumption 2013 UGX Expenses in hotels lodging etc
    "usual_30", -- Daily per capita consumption 2013 UGX Barber and beauty shops
    "usual_29", -- Daily per capita consumption 2013 UGX Houseboys girls etc
    "usual_27", -- Daily per capita consumption 2013 UGX Sports theaters etc
    "usual_26", -- Daily per capita consumption 2013 UGX Medicines etc
    "usual_25", -- Daily per capita consumption 2013 UGX Health and medical care services
    "usual_24", -- Daily per capita consumption 2013 UGX Other transport communication expenses what
    "usual_23", -- Daily per capita consumption 2013 UGX Mobile money fees
    "usual_22", -- Daily per capita consumption 2013 UGX Phone fees
    "usual_21", -- Daily per capita consumption 2013 UGX Stamps envelopes
    "usual_20", -- Daily per capita consumption 2013 UGX Transport fares taxi bus boda boda
    "usual_19", -- Daily per capita consumption 2013 UGX Petrol diesel etc
    "usual_17", -- Daily per capita consumption 2013 UGX Other non durable and personal goods
    "usual_12", -- Daily per capita consumption 2013 UGX Cosmetics
    "usual_11", -- Daily per capita consumption 2013 UGX Toothpaste
    "usual_10", -- Daily per capita consumption 2013 UGX Soap
    "usual_7", -- Daily per capita consumption 2013 UGX Firewood
    "usual_5", -- Daily per capita consumption 2013 UGX Paraffin kerosene
    "usual_3", -- Daily per capita consumption 2013 UGX Electricity
    "usual_2", -- Daily per capita consumption 2013 UGX Water
    "usual_1", -- Daily per capita consumption 2013 UGX Maintenance and repair expenses
    "food_total", -- Daily per capita consumption 2013 UGX Food
    "h101_030", -- Salt 150
    "h101_024", -- Ground nuts 142
    "h101_013", -- Fish 122
    "food_39", -- Daily per capita consumption 2013 UGX Other food not listed
    "food_38", -- Daily per capita consumption 2013 UGX Other food not listed
    "food_36", -- Daily per capita consumption 2013 UGX Food at restaurants
    "food_35", -- Daily per capita consumption 2013 UGX Other tobacco
    "food_32", -- Daily per capita consumption 2013 UGX Alcoholic drinks NOT AT RESTAURANTS
    "food_31", -- Daily per capita consumption 2013 UGX Soda NOT AT RESTAURANTS
    "food_30", -- Daily per capita consumption 2013 UGX Salt
    "food_29", -- Daily per capita consumption 2013 UGX Tea
    "food_28", -- Daily per capita consumption 2013 UGX Coffee
    "food_27", -- Daily per capita consumption 2013 UGX Sugar
    "food_26", -- Daily per capita consumption 2013 UGX Sim sim
    "food_25", -- Daily per capita consumption 2013 UGX Peas
    "food_23", -- Daily per capita consumption 2013 UGX Beans
    "food_22", -- Daily per capita consumption 2013 UGX Other vegetables
    "food_17", -- Daily per capita consumption 2013 UGX Cooking oil
    "food_16", -- Daily per capita consumption 2013 UGX Infant formula foods
    "food_15", -- Daily per capita consumption 2013 UGX Fresh milk
    "food_14", -- Daily per capita consumption 2013 UGX Eggs
    "food_13", -- Daily per capita consumption 2013 UGX Fish
    "food_11", -- Daily per capita consumption 2013 UGX Other meat
    "food_10", -- Daily per capita consumption 2013 UGX Goat meat
    "food_9", -- Daily per capita consumption 2013 UGX Sorghum
    "food_7", -- Daily per capita consumption 2013 UGX Bread
    "food_6", -- Daily per capita consumption 2013 UGX Maize
    "food_2", -- Daily per capita consumption 2013 UGX Sweet Potatoes
    "food_1", -- Daily per capita consumption 2013 UGX Matooka
    "cluster", -- Cluster
    "h605_33", -- Other what value in Shilling UGX
    "h606_32", -- Other what did you purchase in the past 12 months
    "h605_32", -- Other what value in Shilling UGX
    "h603_32", -- Other what how many do you own
    "h607_31", -- Other what how much did you pay in the past 12 months
    "h605_30", -- Other household assets value in Shilling UGX
    "h607_29", -- Mosquito nets how much did you pay in the past 12 months
    "h607_28", -- Fuel efficient stoves how much did you pay in the past 12 months
    "h605_28", -- Fuel efficient stoves value in Shilling UGX
    "h603_28", -- Fuel efficient stoves how many do you own
    "h602_28", -- Fuel efficient stoves do you own
    "h601_28", -- CODE Fuel efficient stoves
    "h604_27", -- Solar lanterns chargers what is the age
    "h607_24", -- Pigs how much did you pay in the past 12 months
    "h605_24", -- Pigs value in Shilling UGX
    "h604_24", -- Pigs what is the age
    "h603_24", -- Pigs how many do you own
    "h602_24", -- Pigs do you own
    "h605_23", -- Cattle value in Shilling UGX
    "h603_23", -- Cattle how many do you own
    "h602_23", -- Cattle do you own
    "h607_22", -- Chickens how much did you pay in the past 12 months
    "h607_21", -- Goats how much did you pay in the past 12 months
    "h604_21", -- Goats what is the age
    "h603_21", -- Goats how many do you own
    "h607_20", -- Agricultural equipment how much did you pay in the past 12 months
    "h604_20", -- Agricultural equipment what is the age
    "h601_20", -- CODE Agricultural equipment
    "h607_19", -- Other electronic equipment how much did you pay in the past 12 months
    "h605_19", -- Other electronic equipment value in Shilling UGX
    "h602_19", -- Other electronic equipment do you own
    "h603_18", -- Internet access how many do you own
    "h605_17", -- Computers value in Shilling UGX
    "h607_16", -- mobile phones how much did you pay in the past 12 months
    "h605_16", -- mobile phones value in Shilling UGX
    "h604_16", -- mobile phones what is the age
    "h607_15", -- jewelry and watches how much did you pay in the past 12 months
    "h606_15", -- jewelry and watches did you purchase in the past 12 months
    "h605_15", -- jewelry and watches value in Shilling UGX
    "h604_15", -- jewelry and watches what is the age
    "h605_13", -- Boats value in Shilling UGX
    "h604_13", -- Boats what is the age
    "id",
    "asset_rental_final_26", -- Daily per capita rental equivalent 2013 UGX Solar lanterns chargers
    "asset_rental_final_21", -- Daily per capita rental equivalent 2013 UGX Chickens
    "asset_rental_final_15", -- Daily per capita rental equivalent 2013 UGX Mobile phones
    "asset_rental_final_11", -- Daily per capita rental equivalent 2013 UGX Motor vehicles
    "asset_rental_final_2", -- Daily per capita rental equivalent 2013 UGX Land
    "asset_rental_final_1", -- Daily per capita rental equivalent 2013 UGX Other buildings
    "occasional_35", -- Daily per capita consumption 2013 UGX Funerals and other social functions
    "occasional_29", -- Daily per capita consumption 2013 UGX Taxes income local services etc
    "occasional_25", -- Daily per capita consumption 2013 UGX Other educational expenses
    "occasional_24", -- Daily per capita consumption 2013 UGX Educational fees pta boarding uniforms books supplies
    "occasional_23", -- Daily per capita consumption 2013 UGX Other glass tableware utensils and repairs
    "occasional_19", -- Daily per capita consumption 2013 UGX Jewelry watches etc
    "occasional_17", -- Daily per capita consumption 2013 UGX Security protection
    "occasional_10", -- Daily per capita consumption 2013 UGX Charcoal and kerosene stoves
    "occasional_8", -- Daily per capita consumption 2013 UGX Curtains bedsheets mattress blankets etc
    "occasional_7", -- Daily per capita consumption 2013 UGX Carpets mats etc
    "occasional_6", -- Daily per capita consumption 2013 UGX Furniture items
    "occasional_5", -- Daily per capita consumption 2013 UGX Other footwear and repairs
    "usual_total", -- Total usual expenditures Daily per capita in 2013 UGX
    "usual_18", -- Daily per capita consumption 2013 UGX Tires tubes spares etc
    "usual_16", -- Daily per capita consumption 2013 UGX Security protection
    "usual_14", -- Daily per capita consumption 2013 UGX Batteries
    "usual_13", -- Daily per capita consumption 2013 UGX Handbags travel bags etc
    "usual_9", -- Daily per capita consumption 2013 UGX Matches
    "usual_8", -- Daily per capita consumption 2013 UGX Other utilities power expenses
    "usual_6", -- Daily per capita consumption 2013 UGX Charcoal
    "h101_038", -- Other food not listed 161
    "h101_035", -- Other tobacco 156
    "h101_019", -- Fruits 130
    "h101_011", -- Other meat 120
    "food_37", -- Daily per capita consumption 2013 UGX Drinks at restaurants
    "food_21", -- Daily per capita consumption 2013 UGX Tomatoes
    "food_20", -- Daily per capita consumption 2013 UGX Onions
    "food_19", -- Daily per capita consumption 2013 UGX Fruits
    "food_18", -- Daily per capita consumption 2013 UGX Margerine butter ghee etc
    "food_12", -- Daily per capita consumption 2013 UGX Chicken
    "food_8", -- Daily per capita consumption 2013 UGX Millet
    "food_5", -- Daily per capita consumption 2013 UGX Rice
    "food_4", -- Daily per capita consumption 2013 UGX Irish potatoes
    "food_3", -- Daily per capita consumption 2013 UGX Cassava
    "hhwt", -- Household Weight
    "h607_33", -- Other what how much did you pay in the past 12 months
    "h607_32", -- Other what how much did you pay in the past 12 months
    "h602_32", -- Other what do you own
    "h605_31", -- Other what value in Shilling UGX
    "h606_29", -- Mosquito nets did you purchase in the past 12 months
    "h604_29", -- Mosquito nets what is the age
    "h605_27", -- Solar lanterns chargers value in Shilling UGX
    "h603_27", -- Solar lanterns chargers how many do you own
    "h605_26", -- Donkeys value in Shilling UGX
    "h604_26", -- Donkeys what is the age
    "h602_26", -- Donkeys do you own
    "h603_25", -- Camels how many do you own
    "h604_23", -- Cattle what is the age
    "h605_22", -- Chickens value in Shilling UGX
    "h604_22", -- Chickens what is the age
    "h605_21", -- Goats value in Shilling UGX
    "h605_20", -- Agricultural equipment value in Shilling UGX
    "h606_19", -- Other electronic equipment did you purchase in the past 12 months
    "h604_19", -- Other electronic equipment what is the age
    "h607_18", -- Internet access how much did you pay in the past 12 months
    "h607_17", -- Computers how much did you pay in the past 12 months
    "h604_17", -- Computers what is the age
    "h603_16", -- mobile phones how many do you own
    "h602_15", -- jewelry and watches do you own
    "h605_14", -- Other transport equipment value in Shilling UGX
    "h602_14", -- Other transport equipment do you own
    "h606_13", -- Boats did you purchase in the past 12 months
    "h603_13", -- Boats how many do you own
    "h603_12", -- Motor vehicles how many do you own
    "h607_11", -- Motor cycles how much did you pay in the past 12 months
    "occasional_9", -- Daily per capita consumption 2013 UGX Other furnishings and repairs
    "rent_flag", -- Cases with imputed rent values
    "h601_32", -- 32 Other household assets what
    "h101_018", -- Margerine butter ghee etc 129
    "h101_017", -- Cooking oil 127
    "h604_33", -- Other what what is the age
    "h601_29", -- CODE Mosquito nets
    "h606_30", -- Other household assets did you purchase in the past 12 months
    "h602_27", -- Solar lanterns chargers do you own
    "food_40", -- Daily per capita consumption 2013 UGX Other food not listed
    "h603_31", -- Other what how many do you own
    "h101_010", -- Goat meat 119
    "h101_031", -- Soda NOT AT RESTAURANTS 151
    "h607_30", -- Other household assets how much did you pay in the past 12 months
    "h602_16", -- mobile phones do you own
    "h601_15", -- CODE jewelry and watches
    "h606_16", -- mobile phones did you purchase in the past 12 months
    "h606_24", -- Pigs did you purchase in the past 12 months
    "occasional_36", -- Daily per capita consumption 2013 UGX Interest on loans
    "h606_26", -- Donkeys did you purchase in the past 12 months
    "h604_18", -- Internet access what is the age
    "h101_016", -- Infant formula foods 126
    "h605_25", -- Camels value in Shilling UGX
    "h607_27", -- Solar lanterns chargers how much did you pay in the past 12 months
    "food_33", -- Daily per capita consumption 2013 UGX Other drinks
    "h101_015", -- Fresh milk 125
    "h603_19", -- Other electronic equipment how many do you own
    "asset_rental_final_31", -- Daily per capita rental equivalent 2013 UGX Other what
    "h101_012", -- Chicken 121
    "h601_12", -- CODE Motor vehicles
    "h101_021", -- Tomatoes 136
    "h101_026", -- Sim sim 146
    "h601_25", -- CODE Camels
    "h101_036", -- Food at restaurants 157
    "h603_29", -- Mosquito nets how many do you own
    "asset_rental_final_24", -- Daily per capita rental equivalent 2013 UGX Camels
    "h606_18", -- Internet access did you purchase in the past 12 months
    "food_34", -- Daily per capita consumption 2013 UGX Cigarettes
    "h101_001", -- Matooka 101
    "h601_21", -- CODE Goats
    "h101_033", -- Other drinks 154
    "h604_28", -- Fuel efficient stoves what is the age
    "h603_14", -- Other transport equipment how many do you own
    "h603_22", -- Chickens how many do you own
    "h101_040", -- Other food not listed 163
    "h101_009", -- Sorghum 116
    "h606_14", -- Other transport equipment did you purchase in the past 12 months
    "h101_008", -- Millet 115
    "h606_21", -- Goats did you purchase in the past 12 months
    "h101_022", -- Other vegetables 139
    "h601_31", -- 31 Other household assets what
    "h607_14", -- Other transport equipment how much did you pay in the past 12 months
    "asset_rental_final_17", -- Daily per capita rental equivalent 2013 UGX Internet access
    "h602_22", -- Chickens do you own
    "h604_12", -- Motor vehicles what is the age
    "h101_002", -- Sweet Potatoes 105
    "h601_17", -- CODE Computers
    "h607_13", -- Boats how much did you pay in the past 12 months
    "h602_18", -- Internet access do you own
    "h601_13", -- CODE Boats
    "asset_rental_final_5", -- Daily per capita rental equivalent 2013 UGX Television
    "h602_30", -- Other household assets do you own
    "h607_25", -- Camels how much did you pay in the past 12 months
    "h101_034", -- Cigarettes 155
    "h603_20", -- Agricultural equipment how many do you own
    "h606_27", -- Solar lanterns chargers did you purchase in the past 12 months
    "h601_23", -- CODE Cattle
    "h101_025", -- Peas 145
    "h606_23", -- Cattle did you purchase in the past 12 months
    "h606_31", -- Other what did you purchase in the past 12 months
    "h101_020", -- Onions 135
    "usual_4", -- Daily per capita consumption 2013 UGX Generators lawn mower fuels
    "h603_30", -- Other household assets how many do you own
    "h601_30", -- CODE Other household assets
    "h602_33", -- Other what do you own
    "h607_12", -- Motor vehicles how much did you pay in the past 12 months
    "h101_028", -- Coffee 148
    "h101_004", -- Irish potatoes 109
    "h601_33", -- 33 Other household assets what
    "pvo", -- PVO
    "asset_rental_final_32", -- Daily per capita rental equivalent 2013 UGX Other what
    "h606_25", -- Camels did you purchase in the past 12 months
    "h604_25", -- Camels what is the age
    "h605_18", -- Internet access value in Shilling UGX
    "h605_12", -- Motor vehicles value in Shilling UGX
    "h603_15", -- jewelry and watches how many do you own
    "asset_rental_final_27", -- Daily per capita rental equivalent 2013 UGX Fuel efficient stoves
    "h601_18", -- CODE Internet access
    "h604_32", -- Other what what is the age
    "h101_037", -- Drinks at restaurants 158
    "h606_17", -- Computers did you purchase in the past 12 months
    "h602_12", -- Motor vehicles do you own
    "h604_14", -- Other transport equipment what is the age
    "strata", -- Strata
    "h601_16", -- CODE mobile phones
    "h602_13", -- Boats do you own
    "food_24", -- Daily per capita consumption 2013 UGX Ground nuts
    "h601_19", -- CODE Other electronic equipment
    "occasional_22", -- Daily per capita consumption 2013 UGX Switches plugs cables etc
    "total_members", -- Total household members
    "h601_22", -- CODE Chickens
    "h601_14", -- CODE Other transport equipment
    "h101_032", -- Alcoholic drinks NOT AT RESTAURANTS 152
    "h601_26", -- CODE Donkeys
    "h602_17", -- Computers do you own
    "h602_20", -- Agricultural equipment do you own
    "h101_023", -- Beans 140
    "h606_28", -- Fuel efficient stoves did you purchase in the past 12 months
    "h602_25", -- Camels do you own
    "h602_31", -- Other what do you own
    "h101_003", -- Cassava 107
    "h607_26", -- Donkeys how much did you pay in the past 12 months
    "h606_22", -- Chickens did you purchase in the past 12 months
    "h606_12", -- Motor vehicles did you purchase in the past 12 months
    "h604_30", -- Other household assets what is the age
    "h603_17", -- Computers how many do you own
    "h101_006", -- Maize 111
    "asset_rental_final_13", -- Daily per capita rental equivalent 2013 UGX Other transport equipment
    "h603_33", -- Other what how many do you own
    "h101_029", -- Tea 149
    "h605_29", -- Mosquito nets value in Shilling UGX
    "h601_27", -- CODE Solar lanterns chargers
    "h604_31", -- Other what what is the age
    "h603_26", -- Donkeys how many do you own
    "h606_11", -- Motor cycles did you purchase in the past 12 months
    "h101_039", -- Other food not listed 162
    "h101_007", -- Bread 114
    "h606_33", -- Other what did you purchase in the past 12 months
    "h607_23", -- Cattle how much did you pay in the past 12 months
    "h101_014", -- Eggs 124
    "h605_11", -- Motor cycles value in Shilling UGX
    "h602_29", -- Mosquito nets do you own
    "h601_24", -- CODE Pigs
    "h101_027", -- Sugar 147
    "usual_28", -- Daily per capita consumption 2013 UGX Dry cleaining and laundry
    "occasional_32", -- Daily per capita consumption 2013 UGX Pension and social security payments
    "h101_005", -- Rice 110
    "usual_15", -- Daily per capita consumption 2013 UGX Newspapers and magazines
    "h606_20", -- Agricultural equipment did you purchase in the past 12 months
    "rent_paid" -- Daily per capita consumption 2013 GTQ Housing rental equivalent
FROM
    "usaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat:latest"."baseline_study_of_food_for_peace_title_ii"
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 usaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat with SQL in under 60 seconds.

This repository is an "external" repository. That means it's hosted elsewhere, in this case at data.usaid.gov. When you queryusaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat: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 https://github.com/splitgraph/splitgraph/releases/latest/download/install.sh)"
 

Read the installation docs.

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 data.usaid.gov, 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 \
  "usaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat" \
  --handler-options '{
    "domain": "data.usaid.gov",
    "tables": {
        "baseline_study_of_food_for_peace_title_ii": "svv9-vmat"
    }
}'

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, usaid-gov/baseline-study-of-food-for-peace-title-ii-svv9-vmat is just another Postgres schema.