usaid-gov/baseline-study-of-food-for-peace-title-ii-jn7r-kht7
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-jn7r-kht7:latest"."baseline_study_of_food_for_peace_title_ii"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "h106u_002", -- Sweet potatoes How much came from your own production Unit
    "h103u_003", -- Cassava How much did you eat in the past 7 days Unit
    "h103u_004", -- Irish poatatoes How much did you eat in the past 7 days Unit
    "h107q_004", -- Irish potatoes How much came from gifts other sources Quantity
    "h104u_005", -- Rice How much came from purchases Unit
    "h106q_005", -- Rice How much came from your own production Quantity
    "h106u_005", -- Rice How much came from your own production Unit
    "h106u_024", -- Ground nuts How much came from your own production Unit
    "h106q_016", -- Infant formula foods How much came from your own production Quantity
    "h102_035", -- Other tobacco Did you eat any in the past 7 days
    "h103q_006", -- Maize How much did you eat in the past 7 days Quantity
    "h104u_006", -- Maize How much came from purchases Unit
    "h107u_006", -- Maize How much came from gifts other sources Unit
    "h103u_007", -- Bread How much did you eat in the past 7 days Unit
    "h104q_007", -- Bread How much came from purchases Quanity
    "h107u_008", -- Millet How much came from gifts other sources Unit
    "h107q_008", -- Millet How much came from gifts other sources Quantity
    "h103u_008", -- Millet How much did you eat in the past 7 days Unit
    "h102_008", -- Millet Did you eat any in the past 7 days
    "h107u_007", -- Bread How much came from gifts other sources Unit
    "h107q_007", -- Bread How much came from gifts other sources Quantity
    "h103u_023", -- Beans How much did you eat in the past 7 days Unit
    "h107u_022", -- Other vegetables How much came from gifts other sources Unit
    "h104q_023", -- Beans How much came from purchases Quanity
    "h104u_023", -- Beans How much came from purchases Unit
    "h106q_023", -- Beans How much came from your own production Quantity
    "h107q_023", -- Beans How much came from gifts other sources Quantity
    "h103q_033", -- Other drinks How much did you eat in the past 7 days Quantity
    "h103q_032", -- Alcoholic drinks NOT AT RESTAURANTS How much did you eat in the past 7 days Quantity
    "h106q_031", -- Soda NOT AT RESTAURANTS How much came from your own production Quantity
    "h105_031", -- Soda NOT AT RESTAURANTS How much did you spend Shilling UGX
    "h106q_030", -- Salt How much came from your own production Quantity
    "h104u_030", -- Salt How much came from purchases Unit
    "h107u_023", -- Beans How much came from gifts other sources Unit
    "h104q_030", -- Salt How much came from purchases Quanity
    "h106u_013", -- Fish How much came from your own production Unit
    "h107u_026", -- Sim sim How much came from gifts other sources Unit
    "h103u_025", -- Peas How much did you eat in the past 7 days Unit
    "h105_025", -- Peas How much did you spend Shilling UGX
    "h106q_013", -- Fish How much came from your own production Quantity
    "h104q_032", -- Alcoholic drinks NOT AT RESTAURANTS How much came from purchases Quanity
    "h107u_029", -- Tea How much came from gifts other sources Unit
    "h105_020", -- Onions How much did you spend Shilling UGX
    "h106q_026", -- Sim sim How much came from your own production Quantity
    "h103u_005", -- Rice How much did you eat in the past 7 days Unit
    "h104u_020", -- Onions How much came from purchases Unit
    "h104u_022", -- Other vegetables How much came from purchases Unit
    "h104q_020", -- Onions How much came from purchases Quanity
    "h107u_004", -- Irish potatoes How much came from gifts other sources Unit
    "h103q_022", -- Other vegetables How much did you eat in the past 7 days Quantity
    "h105_021", -- Tomatoes How much did you spend Shilling UGX
    "h107u_020", -- Onions How much came from gifts other sources Unit
    "h106u_020", -- Onions How much came from your own production Unit
    "h106q_019", -- Fruits How much came from your own production Quantity
    "h107u_024", -- Ground nuts How much came from gifts other sources Unit
    "h104q_029", -- Tea How much came from purchases Quanity
    "h106u_015", -- Fresh milk How much came from your own production Unit
    "h103u_029", -- Tea How much did you eat in the past 7 days Unit
    "h103q_007", -- Bread How much did you eat in the past 7 days Quantity
    "h107u_028", -- Coffee How much came from gifts other sources Unit
    "h103u_026", -- Sim sim How much did you eat in the past 7 days Unit
    "h106u_014", -- Eggs How much came from your own production Unit
    "h106q_028", -- Coffee How much came from your own production Quantity
    "h104u_019", -- Fruits How much came from purchases Unit
    "h104u_018", -- Margerine butter ghee etc How much came from purchases Unit
    "h107u_017", -- Cooking oil How much came from gifts other sources Unit
    "h107u_016", -- Infant formula foods How much came from gifts other sources Unit
    "h106u_016", -- Infant formula foods How much came from your own production Unit
    "h104u_033", -- Other drinks How much came from purchases Unit
    "h107u_012", -- Chicken How much came from gifts other sources Unit
    "h107q_005", -- Rice How much came from gifts other sources Quantity
    "h103u_016", -- Infant formula foods How much did you eat in the past 7 days Unit
    "h104u_025", -- Peas How much came from purchases Unit
    "h107q_016", -- Infant formula foods How much came from gifts other sources Quantity
    "h104q_022", -- Other vegetables How much came from purchases Quanity
    "h104u_021", -- Tomatoes How much came from purchases Unit
    "h107u_033", -- Other drinks How much came from gifts other sources Unit
    "h104q_021", -- Tomatoes How much came from purchases Quanity
    "h106q_020", -- Onions How much came from your own production Quantity
    "h106u_022", -- Other vegetables How much came from your own production Unit
    "h104u_015", -- Fresh milk How much came from purchases Unit
    "h103q_015", -- Fresh milk How much did you eat in the past 7 days Quantity
    "h106q_014", -- Eggs How much came from your own production Quantity
    "h104u_032", -- Alcoholic drinks NOT AT RESTAURANTS How much came from purchases Unit
    "h107q_013", -- Fish How much came from gifts other sources Quantity
    "h105_032", -- Alcoholic drinks NOT AT RESTAURANTS How much did you spend Shilling UGX
    "h106u_030", -- Salt How much came from your own production Unit
    "h106q_015", -- Fresh milk How much came from your own production Quantity
    "h106q_032", -- Alcoholic drinks NOT AT RESTAURANTS How much came from your own production Quantity
    "h106u_032", -- Alcoholic drinks NOT AT RESTAURANTS How much came from your own production Unit
    "h106u_031", -- Soda NOT AT RESTAURANTS How much came from your own production Unit
    "h106u_001", -- Matooka How much came from your own production Unit
    "h102_006", -- Maize Did you eat any in the past 7 days
    "h107q_030", -- Salt How much came from gifts other sources Quantity
    "h104u_004", -- Irish potatoes How much came from purchases Unit
    "h104u_003", -- Cassava How much came from purchases Unit
    "h105_033", -- Other drinks How much did you spend Shilling UGX
    "h103u_022", -- Other vegetables How much did you eat in the past 7 days Unit
    "h102_001", -- Matooka Did you eat any in the past 7 days
    "h103q_024", -- Ground nuts How much did you eat in the past 7 days Quantity
    "h103u_024", -- Ground nuts How much did you eat in the past 7 days Unit
    "h107u_021", -- Tomatoes How much came from gifts other sources Unit
    "h107u_014", -- Eggs How much came from gifts other sources Unit
    "h106q_034", -- Cigarettes How much came from your own production Quantity
    "h104u_014", -- Eggs How much came from purchases Unit
    "h102_025", -- Peas Did you eat any in the past 7 days
    "h103q_026", -- Sim sim How much did you eat in the past 7 days Quantity
    "h103q_013", -- Fish How much did you eat in the past 7 days Quantity
    "h103q_029", -- Tea How much did you eat in the past 7 days Quantity
    "h106q_021", -- Tomatoes How much came from your own production Quantity
    "h103q_034", -- Cigarettes How much did you eat in the past 7 days Quantity
    "h107q_033", -- Other drinks How much came from gifts other sources Quantity
    "h103u_034", -- Cigarettes How much did you eat in the past 7 days Unit
    "h107u_003", -- Cassava How much came from gifts other sources Unit
    "h103q_035", -- Other tobacco How much did you eat in the past 7 days Quantity
    "h001", -- H001 LINE NUMBER FOR PERSON PREPARING FOOD
    "h103u_031", -- Soda NOT AT RESTAURANTS How much did you eat in the past 7 days Unit
    "h104u_013", -- Fish How much came from purchases Unit
    "h107u_011", -- Other meat How much came from gifts other sources Unit
    "h103u_032", -- Alcoholic drinks NOT AT RESTAURANTS How much did you eat in the past 7 days Unit
    "h105_030", -- Salt How much did you spend Shilling UGX
    "h106u_029", -- Tea How much came from your own production Unit
    "h105_029", -- Tea How much did you spend Shilling UGX
    "h107u_027", -- Sugar How much came from gifts other sources Unit
    "h107q_027", -- Sugar How much came from gifts other sources Quantity
    "h106u_026", -- Sim sim How much came from your own production Unit
    "h104q_026", -- Sim sim How much came from purchases Quanity
    "h107q_025", -- Peas How much came from gifts other sources Quantity
    "h103u_033", -- Other drinks How much did you eat in the past 7 days Unit
    "h00h", -- H00H MODULE H START HOUR
    "h01h", -- H01H MODULE H FINISH HOUR
    "h01m", -- H01M MODULE H FINISH MINUTE
    "h103u_001", -- Matooka How much did you eat in the past 7 days Unit
    "h104q_001", -- Matooka How much came from purchases Quanity
    "h105_001", -- Matooka How much did you spend Shilling UGX
    "h107u_001", -- Matooka How much came from gifts other sources Unit
    "h103q_002", -- Sweet potatoes How much did you eat in the past 7 days Quantity
    "h103u_002", -- Sweet potatoes How much did you eat in the past 7 days Unit
    "h104q_002", -- Sweet potatoes How much came from purchases Quanity
    "h105_002", -- Sweet potatoes How much did you spend Shilling UGX
    "h103u_020", -- Onions How much did you eat in the past 7 days Unit
    "h102_007", -- Bread Did you eat any in the past 7 days
    "h106q_002", -- Sweet potatoes How much came from your own production Quantity
    "h107u_002", -- Sweet potatoes How much came from gifts other sources Unit
    "h103q_003", -- Cassava How much did you eat in the past 7 days Quantity
    "h104q_003", -- Cassava How much came from purchases Quanity
    "h105_003", -- Cassava How much did you spend Shilling UGX
    "h106u_003", -- Cassava How much came from your own production Unit
    "h103q_004", -- Irish potatoes How much did you eat in the past 7 days Quantity
    "h104q_004", -- Irish potatoes How much came from purchases Quanity
    "h105_004", -- Irish potatoes How much did you spend Shilling UGX
    "h104u_027", -- Sugar How much came from purchases Unit
    "h102_018", -- Margerine butter ghee etc Did you eat any in the past 7 days
    "h104q_035", -- Other tobacco How much came from purchases Quanity
    "h102_019", -- Fruits Did you eat any in the past 7 days
    "h103q_023", -- Beans How much did you eat in the past 7 days Quantity
    "h104u_031", -- Soda NOT AT RESTAURANTS How much came from purchases Unit
    "h107q_026", -- Sim sim How much came from gifts other sources Quantity
    "h102_013", -- Fish Did you eat any in the past 7 days
    "h104u_008", -- Millet How much came from purchases Unit
    "h105_028", -- Coffee How much did you spend Shilling UGX
    "h103q_001", -- Matooka How much did you eat in the past 7 days Quantity
    "h107q_003", -- Cassava How much came from gifts other sources Quantity
    "h107u_015", -- Fresh milk How much came from gifts other sources Unit
    "h106u_019", -- Fruits How much came from your own production Unit
    "h105_026", -- Sim sim How much did you spend Shilling UGX
    "h107u_005", -- Rice How much came from gifts other sources Unit
    "h106u_025", -- Peas How much came from your own production Unit
    "h106q_004", -- Irish potatoes How much came from your own production Quantity
    "h105_006", -- Maize How much did you spend Shilling UGX
    "h103u_035", -- Other tobacco How much did you eat in the past 7 days Unit
    "h103u_015", -- Fresh milk How much did you eat in the past 7 days Unit
    "h106q_001", -- Matooka How much came from your own production Quantity
    "h106q_033", -- Other drinks How much came from your own production Quantity
    "h107u_030", -- Salt How much came from gifts other sources Unit
    "h107u_018", -- Margerine butter ghee etc How much came from gifts other sources Unit
    "h104q_033", -- Other drinks How much came from purchases Quanity
    "h103u_019", -- Fruits How much did you eat in the past 7 days Unit
    "h105_023", -- Beans How much did you spend Shilling UGX
    "h104q_024", -- Ground nuts How much came from purchases Quanity
    "h103q_020", -- Onions How much did you eat in the past 7 days Quantity
    "h102_031", -- Soda NOT AT RESTAURANTS Did you eat any in the past 7 days
    "h103u_021", -- Tomatoes How much did you eat in the past 7 days Unit
    "h103q_005", -- Rice How much did you eat in the past 7 days Quantity
    "h104q_005", -- Rice How much came from purchases Quanity
    "h105_005", -- Rice How much did you spend Shilling UGX
    "h103u_006", -- Maize How much did you eat in the past 7 days Unit
    "h104q_006", -- Maize How much came from purchases Quanity
    "h106q_006", -- Maize How much came from your own production Quantity
    "h107q_006", -- Maize How much came from gifts other sources Quantity
    "h104u_007", -- Bread How much came from purchases Unit
    "h105_007", -- Bread How much did you spend Shilling UGX
    "h106u_007", -- Bread How much came from your own production Unit
    "h103q_008", -- Millet How much did you eat in the past 7 days Quantity
    "h104q_008", -- Millet How much came from purchases Quanity
    "h105_008", -- Millet How much did you spend Shilling UGX
    "h106u_018", -- Margerine butter ghee etc How much came from your own production Unit
    "h104q_034", -- Cigarettes How much came from purchases Quanity
    "h107q_029", -- Tea How much came from gifts other sources Quantity
    "h106q_022", -- Other vegetables How much came from your own production Quantity
    "h103q_011", -- Other meat How much did you eat in the past 7 days Quantity
    "h104q_019", -- Fruits How much came from purchases Quanity
    "h104q_031", -- Soda NOT AT RESTAURANTS How much came from purchases Quanity
    "h103u_030", -- Salt How much did you eat in the past 7 days Unit
    "h104q_016", -- Infant formula foods How much came from purchases Quanity
    "h102_003", -- Cassava Did you eat any in the past 7 days
    "h107u_032", -- Alcoholic drinks NOT AT RESTAURANTS How much came from gifts other sources Unit
    "h102_014", -- Eggs Did you eat any in the past 7 days
    "h102_034", -- Cigarettes Did you eat any in the past 7 days
    "h103q_031", -- Soda NOT AT RESTAURANTS How much did you eat in the past 7 days Quantity
    "h104q_018", -- Margerine butter ghee etc How much came from purchases Quanity
    "h102_029", -- Tea Did you eat any in the past 7 days
    "h107q_034", -- Cigarettes How much came from gifts other sources Quantity
    "h106u_033", -- Other drinks How much came from your own production Unit
    "h102_030", -- Salt Did you eat any in the past 7 days
    "h102_024", -- Ground nuts Did you eat any in the past 7 days
    "h102_002", -- Sweet potatoes Did you eat any in the past 7 days
    "h106q_010", -- Goat meat How much came from your own production Quantity
    "h106q_008", -- Millet How much came from your own production Quantity
    "h106u_008", -- Millet How much came from your own production Unit
    "h103u_009", -- Sorghum How much did you eat in the past 7 days Unit
    "h104u_034", -- Cigarettes How much came from purchases Unit
    "h104u_009", -- Sorghum How much came from purchases Unit
    "h105_009", -- Sorghum How much did you spend Shilling UGX
    "h106q_009", -- Sorghum How much came from your own production Quantity
    "h106q_029", -- Tea How much came from your own production Quantity
    "h107q_009", -- Sorghum How much came from gifts other sources Quantity
    "h107u_009", -- Sorghum How much came from gifts other sources Unit
    "h103u_010", -- Goat meat How much did you eat in the past 7 days Unit
    "h104q_010", -- Goat meat How much came from purchases Quanity
    "h104u_010", -- Goat meat How much came from purchases Unit
    "h103q_014", -- Eggs How much did you eat in the past 7 days Quantity
    "h102_027", -- Sugar Did you eat any in the past 7 days
    "h107q_017", -- Cooking oil How much came from gifts other sources Quantity
    "h103q_018", -- Margerine butter ghee etc How much did you eat in the past 7 days Quantity
    "h102_021", -- Tomatoes Did you eat any in the past 7 days
    "h106u_023", -- Beans How much came from your own production Unit
    "h107q_024", -- Ground nuts How much came from gifts other sources Quantity
    "h104u_029", -- Tea How much came from purchases Unit
    "h102_015", -- Fresh milk Did you eat any in the past 7 days
    "h105_024", -- Ground nuts How much did you spend Shilling UGX
    "h102_023", -- Beans Did you eat any in the past 7 days
    "h105_010", -- Goat meat How much did you spend Shilling UGX
    "h106u_010", -- Goat meat How much came from your own production Unit
    "h107q_010", -- Goat meat How much came from gifts other sources Quantity
    "h107u_010", -- Goat meat How much came from gifts other sources Unit
    "h104q_011", -- Other meat How much came from purchases Quanity
    "h104u_011", -- Other meat How much came from purchases Unit
    "h103q_012", -- Chicken How much did you eat in the past 7 days Quantity
    "h103u_012", -- Chicken How much did you eat in the past 7 days Unit
    "h107q_022", -- Other vegetables How much came from gifts other sources Quantity
    "h103q_019", -- Fruits How much did you eat in the past 7 days Quantity
    "h103q_009", -- Sorghum How much did you eat in the past 7 days Quantity
    "h103q_030", -- Salt How much did you eat in the past 7 days Quantity
    "h106q_025", -- Peas How much came from your own production Quantity
    "h106q_027", -- Sugar How much came from your own production Quantity
    "h105_012", -- Chicken How much did you spend Shilling UGX
    "h106q_012", -- Chicken How much came from your own production Quantity
    "h106q_024", -- Ground nuts How much came from your own production Quantity
    "h104q_025", -- Peas How much came from purchases Quanity
    "h104u_026", -- Sim sim How much came from purchases Unit
    "h103q_027", -- Sugar How much did you eat in the past 7 days Quantity
    "h103u_027", -- Sugar How much did you eat in the past 7 days Unit
    "h104q_027", -- Sugar How much came from purchases Quanity
    "h107q_028", -- Coffee How much came from gifts other sources Quantity
    "h106u_027", -- Sugar How much came from your own production Unit
    "h106u_028", -- Coffee How much came from your own production Unit
    "h104u_024", -- Ground nuts How much came from purchases Unit
    "h103u_028", -- Coffee How much did you eat in the past 7 days Unit
    "h106u_021", -- Tomatoes How much came from your own production Unit
    "h104u_028", -- Coffee How much came from purchases Unit
    "h103u_011", -- Other meat How much did you eat in the past 7 days Unit
    "h102_012", -- Chicken Did you eat any in the past 7 days
    "h106u_012", -- Chicken How much came from your own production Unit
    "h107u_031", -- Soda NOT AT RESTAURANTS How much came from gifts other sources Unit
    "h103u_013", -- Fish How much did you eat in the past 7 days Unit
    "h104q_013", -- Fish How much came from purchases Quanity
    "h105_013", -- Fish How much did you spend Shilling UGX
    "h103u_014", -- Eggs How much did you eat in the past 7 days Unit
    "h104q_014", -- Eggs How much came from purchases Quanity
    "h105_014", -- Eggs How much did you spend Shilling UGX
    "h104q_028", -- Coffee How much came from purchases Quanity
    "h107q_002", -- Sweet potatoes How much came from gifts other sources Quantity
    "h102_022", -- Other vegetables Did you eat any in the past 7 days
    "h102_010", -- Goat meat Did you eat any in the past 7 days
    "h102_016", -- Infant formula foods Did you eat any in the past 7 days
    "h104q_012", -- Chicken How much came from purchases Quanity
    "h107u_019", -- Fruits How much came from gifts other sources Unit
    "h102_020", -- Onions Did you eat any in the past 7 days
    "h107q_018", -- Margerine butter ghee etc How much came from gifts other sources Quantity
    "h106q_007", -- Bread How much came from your own production Quantity
    "h102_026", -- Sim sim Did you eat any in the past 7 days
    "h106q_003", -- Cassava How much came from your own production Quantity
    "h107q_019", -- Fruits How much came from gifts other sources Quantity
    "h106u_006", -- Maize How much came from your own production Unit
    "h107q_014", -- Eggs How much came from gifts other sources Quantity
    "h104q_015", -- Fresh milk How much came from purchases Quanity
    "h105_015", -- Fresh milk How much did you spend Shilling UGX
    "h104u_016", -- Infant formula foods How much came from purchases Unit
    "h105_016", -- Infant formula foods How much did you spend Shilling UGX
    "h107q_020", -- Onions How much came from gifts other sources Quantity
    "h102_004", -- Irish potatoes Did you eat any in the past 7 days
    "h103q_028", -- Coffee How much did you eat in the past 7 days Quantity
    "h107q_012", -- Chicken How much came from gifts other sources Quantity
    "h106u_004", -- Irish potatoes How much came from your own production Unit
    "h103q_016", -- Infant formula foods How much did you eat in the past 7 days Quantity
    "h107u_025", -- Peas How much came from gifts other sources Unit
    "h107u_013", -- Fish How much came from gifts other sources Unit
    "h104u_012", -- Chicken How much came from purchases Unit
    "h102_009", -- Sorghum Did you eat any in the past 7 days
    "h106q_018", -- Margerine butter ghee etc How much came from your own production Quantity
    "h105_034", -- Cigarettes How much did you spend Shilling UGX
    "h107q_021", -- Tomatoes How much came from gifts other sources Quantity
    "h107u_034", -- Cigarettes How much came from gifts other sources Unit
    "h105_027", -- Sugar How much did you spend Shilling UGX
    "h102_032", -- Alcoholic drinks NOT AT RESTAURANTS Did you eat any in the past 7 days
    "h103q_021", -- Tomatoes How much did you eat in the past 7 days Quantity
    "h105_019", -- Fruits How much did you spend Shilling UGX
    "h102_005", -- Rice Did you eat any in the past 7 days
    "h107q_015", -- Fresh milk How much came from gifts other sources Quantity
    "h105_018", -- Margerine butter ghee etc How much did you spend Shilling UGX
    "h102_028", -- Coffee Did you eat any in the past 7 days
    "h106u_034", -- Cigarettes How much came from your own production Unit
    "h102_033", -- Other drinks Did you eat any in the past 7 days
    "h103q_025", -- Peas How much did you eat in the past 7 days Quantity
    "h103u_018", -- Margerine butter ghee etc How much did you eat in the past 7 days Unit
    "h106u_011", -- Other meat How much came from your own production Unit
    "h106u_017", -- Cooking oil How much came from your own production Unit
    "h106q_017", -- Cooking oil How much came from your own production Quantity
    "h105_017", -- Cooking oil How much did you spend Shilling UGX
    "h104u_017", -- Cooking oil How much came from purchases Unit
    "h104q_017", -- Cooking oil How much came from purchases Quanity
    "h103u_017", -- Cooking oil How much did you eat in the past 7 days Unit
    "h103q_017", -- Cooking oil How much did you eat in the past 7 days Quantity
    "h102_017", -- Cooking oil Did you eat any in the past 7 days
    "h105_022", -- Other vegetables How much did you spend Shilling UGX
    "h107q_011", -- Other meat How much came from gifts other sources Quantity
    "h107q_032", -- Alcoholic drinks NOT AT RESTAURANTS How much came from gifts other sources Quantity
    "h106q_011", -- Other meat How much came from your own production Quantity
    "h105_011", -- Other meat How much did you spend Shilling UGX
    "h102_011", -- Other meat Did you eat any in the past 7 days
    "h107q_031", -- Soda NOT AT RESTAURANTS How much came from gifts other sources Quantity
    "id",
    "h00m", -- H00M MODULE H START MINUTE
    "h104u_001", -- Matooka How much came from purchases Unit
    "h103q_010", -- Goat meat How much did you eat in the past 7 days Quantity
    "h106u_009", -- Sorghum How much came from your own production Unit
    "h104q_009", -- Sorghum How much came from purchases Quanity
    "h107q_001", -- Matooka How much came from gifts other sources Quantity
    "h104u_002" -- Sweet potatoes How much came from purchases Unit
FROM
    "usaid-gov/baseline-study-of-food-for-peace-title-ii-jn7r-kht7: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-jn7r-kht7 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-jn7r-kht7: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-jn7r-kht7" \
  --handler-options '{
    "domain": "data.usaid.gov",
    "tables": {
        "baseline_study_of_food_for_peace_title_ii": "jn7r-kht7"
    }
}'

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-jn7r-kht7 is just another Postgres schema.