Line 12:
Line 12:
.mode box -- comment: change display mode to nice table
.mode box -- comment: change display mode to nice table
describe select * from 'food.parquet';
describe select * from 'food.parquet';
+
+
You can also restrict listing to column_name and column_type:
+
select column_name, column_type from (describe select * from 'food.parquet');
+
+
At the end of the page, we provide the full list of fields based on this query.
==== Creating a new parquet file for my country ====
==== Creating a new parquet file for my country ====
Line 135:
Line 140:
│ 716207 │
│ 716207 │
└─────────────┘
└─────────────┘
−
[[Category:Metrics]]
+
+
==== Annex: parquet schema ====
+
{| class="wikitable"
+
! column_name !! column_type
+
|-
+
| additives_n || INTEGER
+
|-
+
| additives_tags || VARCHAR[]
+
|-
+
| allergens_tags || VARCHAR[]
+
|-
+
| brands_tags || VARCHAR[]
+
|-
+
| brands || VARCHAR
+
|-
+
| categories || VARCHAR
+
|-
+
| categories_tags || VARCHAR[]
+
|-
+
| checkers_tags || VARCHAR[]
+
|-
+
| ciqual_food_name_tags || VARCHAR[]
+
|-
+
| cities_tags || VARCHAR[]
+
|-
+
| code || VARCHAR
+
|-
+
| compared_to_category || VARCHAR
+
|-
+
| complete || INTEGER
+
|-
+
| completeness || FLOAT
+
|-
+
| correctors_tags || VARCHAR[]
+
|-
+
| countries_tags || VARCHAR[]
+
|-
+
| created_t || BIGINT
+
|-
+
| creator || VARCHAR
+
|-
+
| data_quality_errors_tags || VARCHAR[]
+
|-
+
| data_quality_info_tags || VARCHAR[]
+
|-
+
| data_quality_warnings_tags || VARCHAR[]
+
|-
+
| data_sources_tags || VARCHAR[]
+
|-
+
| ecoscore_data || VARCHAR
+
|-
+
| ecoscore_grade || VARCHAR
+
|-
+
| ecoscore_score || INTEGER
+
|-
+
| ecoscore_tags || VARCHAR[]
+
|-
+
| editors || VARCHAR[]
+
|-
+
| emb_codes_tags || VARCHAR[]
+
|-
+
| emb_codes || VARCHAR
+
|-
+
| entry_dates_tags || VARCHAR[]
+
|-
+
| food_groups_tags || VARCHAR[]
+
|-
+
| generic_name || STRUCT(lang VARCHAR, "text" VARCHAR)[]
+
|-
+
| images || STRUCT("key" VARCHAR, imgid INTEGER, sizes STRUCT("100" STRUCT(h INTEGER, w INTEGER), "200" STRUCT(h INTEGER, w INTEGER), "400" STRUCT(h INTEGER, w INTEGER), "full" STRUCT(h INTEGER, w INTEGER)), uploaded_t BIGINT, uploader VARCHAR)[]
+
|-
+
| informers_tags || VARCHAR[]
+
|-
+
| ingredients_analysis_tags || VARCHAR[]
+
|-
+
| ingredients_from_palm_oil_n || INTEGER
+
|-
+
| ingredients_n || INTEGER
+
|-
+
| ingredients_original_tags || VARCHAR[]
+
|-
+
| ingredients_percent_analysis || INTEGER
+
|-
+
| ingredients_tags || VARCHAR[]
+
|-
+
| ingredients_text || STRUCT(lang VARCHAR, "text" VARCHAR)[]
+
|-
+
| ingredients_with_specified_percent_n || INTEGER
+
|-
+
| ingredients_with_unspecified_percent_n || INTEGER
+
|-
+
| ingredients_without_ciqual_codes_n || INTEGER
+
|-
+
| ingredients_without_ciqual_codes || VARCHAR[]
+
|-
+
| ingredients || VARCHAR
+
|-
+
| known_ingredients_n || INTEGER
+
|-
+
| labels_tags || VARCHAR[]
+
|-
+
| labels || VARCHAR
+
|-
+
| lang || VARCHAR
+
|-
+
| languages_tags || VARCHAR[]
+
|-
+
| last_edit_dates_tags || VARCHAR[]
+
|-
+
| last_editor || VARCHAR
+
|-
+
| last_image_t || BIGINT
+
|-
+
| last_modified_by || VARCHAR
+
|-
+
| last_modified_t || BIGINT
+
|-
+
| last_updated_t || BIGINT
+
|-
+
| link || VARCHAR
+
|-
+
| main_countries_tags || VARCHAR[]
+
|-
+
| manufacturing_places_tags || VARCHAR[]
+
|-
+
| manufacturing_places || VARCHAR
+
|-
+
| max_imgid || INTEGER
+
|-
+
| minerals_tags || VARCHAR[]
+
|-
+
| misc_tags || VARCHAR[]
+
|-
+
| new_additives_n || INTEGER
+
|-
+
| no_nutrition_data || BOOLEAN
+
|-
+
| nova_group || INTEGER
+
|-
+
| nova_groups_tags || VARCHAR[]
+
|-
+
| nova_groups || VARCHAR
+
|-
+
| nucleotides_tags || VARCHAR[]
+
|-
+
| nutrient_levels_tags || VARCHAR[]
+
|-
+
| nutriments || STRUCT("name" VARCHAR, "value" FLOAT, "100g" FLOAT, serving FLOAT, unit VARCHAR, prepared_value FLOAT, prepared_100g FLOAT, prepared_serving FLOAT, prepared_unit VARCHAR)[]
+
|-
+
| nutriscore_grade || VARCHAR
+
|-
+
| nutriscore_score || INTEGER
+
|-
+
| nutrition_data_per || VARCHAR
+
|-
+
| obsolete || BOOLEAN
+
|-
+
| origins_tags || VARCHAR[]
+
|-
+
| origins || VARCHAR
+
|-
+
| owner_fields || STRUCT(field_name VARCHAR, "timestamp" BIGINT)[]
+
|-
+
| owner || VARCHAR
+
|-
+
| packagings_complete || BOOLEAN
+
|-
+
| packaging_recycling_tags || VARCHAR[]
+
|-
+
| packaging_shapes_tags || VARCHAR[]
+
|-
+
| packaging_tags || VARCHAR[]
+
|-
+
| packaging_text || STRUCT(lang VARCHAR, "text" VARCHAR)[]
+
|-
+
| packaging || VARCHAR
+
|-
+
| packagings || STRUCT(material VARCHAR, number_of_units BIGINT, quantity_per_unit VARCHAR, quantity_per_unit_unit VARCHAR, quantity_per_unit_value VARCHAR, recycling VARCHAR, shape VARCHAR, weight_measured FLOAT)[]
+
|-
+
| photographers || VARCHAR[]
+
|-
+
| popularity_key || BIGINT
+
|-
+
| popularity_tags || VARCHAR[]
+
|-
+
| product_name || STRUCT(lang VARCHAR, "text" VARCHAR)[]
+
|-
+
| product_quantity_unit || VARCHAR
+
|-
+
| product_quantity || VARCHAR
+
|-
+
| purchase_places_tags || VARCHAR[]
+
|-
+
| quantity || VARCHAR
+
|-
+
| rev || INTEGER
+
|-
+
| scans_n || INTEGER
+
|-
+
| serving_quantity || VARCHAR
+
|-
+
| serving_size || VARCHAR
+
|-
+
| states_tags || VARCHAR[]
+
|-
+
| stores_tags || VARCHAR[]
+
|-
+
| stores || VARCHAR
+
|-
+
| traces_tags || VARCHAR[]
+
|-
+
| unique_scans_n || INTEGER
+
|-
+
| unknown_ingredients_n || INTEGER
+
|-
+
| unknown_nutrients_tags || VARCHAR[]
+
|-
+
| vitamins_tags || VARCHAR[]
+
|-
+
| with_non_nutritive_sweeteners || INTEGER
+
|-
+
| with_sweeteners || INTEGER
+
|}