Skip to content
Beta · version 0.7.4 · commands and the JSON format may still change.

Generate computer offers

The Computer example creates offers of computers for sale: laptops, desktops, mini PCs, all-in-ones, single-board computers and servers, each with its parts, price, stock and reviews.

Terminal window
tabalyst generate --example computer --rows 10000 -d computer-output/
Created: computer-output/computers-en.csv
Created: computer-output/computers-fr.csv
Created: computer-output/computers.meta.json
10,000 rows in 3.5s (2,864 rows/s, 3 processes)

computers-en.csv and computers-fr.csv describe the same 10,000 offers: only the labels change (Laptop and Ordinateur portable, Black and Noir). computers.meta.json records the request, the version of Tabalyst, the anomaly profile if any, and a SHA-256 digest of every resource file used, so the files can be reproduced. The default is 10 rows; --rows and --seed change the count and the data. The same seed gives the same files. The times come from one machine and are not a promise.

-o writes a single CSV, in English unless you ask for French with --locales fr. With an anomaly profile, the file holds the errors and a .changes.csv file beside it lists every changed cell:

Terminal window
tabalyst generate --example computer --rows 30000 -o pcs.csv --anomaly-profile dirty_realistic
Created: pcs.csv
Created: pcs.changes.csv
30,000 rows in 9.1s (3,286 rows/s, 3 processes), 8,506 cells changed: generating rows 7.9s, injecting errors 1.2s

No clean copy, summary or metadata file is written with -o: use -d to get them. --locales en, --locales fr or --locales en,fr chooses the languages; with -d, both are written unless you choose one.

OptionWhat it chooses
--output-profileThe columns: compact (40, the default), standard (70) or extended (111).
--generation-profileThe kind of product the catalog favors: balanced (the default), consumer, business, gaming, creator, workstation, enterprise, mixed or portable_only.
--marketThe market of the offers: ca (Canadian dollars, the default) or us (US dollars).
--unit-stylenumeric (plain numbers, the default) or localized (64 GB in English, 64 Go in French).
--unit-columnsThe measured columns written with units, for example memory_gb,display_size_in; it implies localized.

The three profiles nest: standard has every column of compact, and extended has every column of standard. The text values that name something (categories, seller types, warehouses, availability, promotions) are translated in the French file; technical codes such as wifi_7 or tpm_2_0 are the same in both languages.

GroupColumns
Identity (2)product_id, sku
Catalog (8)brand, product_family, model, generation, model_year, computer_type, form_factor, product_segment
Processor (5)cpu_brand, cpu_family, cpu_model, cpu_cores, cpu_threads
Graphics (5)gpu_brand, gpu_family, gpu_model, gpu_type, gpu_vram_gb
Memory and storage (4)memory_type, memory_gb, storage_type, storage_gb
Display (4)display_size_in, display_type, display_resolution, display_refresh_rate_hz
System (3)operating_system, color, weight_kg
Offer (9)currency, list_price, current_price, stock_quantity, stock_status, release_date, rating, review_count, market

product_id is unique in a file. sku identifies a configuration (the parts, the color, the operating system and the market), so rows with the same configuration share it.

GroupColumnWhat it holds
ProductmpnManufacturer part number: MPN- and a digest. Like sku, it identifies a configuration.
Productproduct_categoryOne of 7 categories: laptops, desktops, mini PCs, all-in-one computers, workstations, single-board computers, servers.
Productproduct_subcategoryOne of 17, such as consumer laptop, gaming laptop, business laptop, small form factor PC.
Processorcpu_architecturex86_64 or arm64.
Processorcpu_max_clock_ghzMaximum clock, from 2.4 to 5.6 GHz.
Processornpu_topsPower of the AI accelerator in TOPS; 0 without one.
Processorai_pc_classnpu_capable from 40 TOPS, otherwise none.
Systemos_familywindows, macos, linux or none.
Systemkeyboard_layoutca_multilingual for the ca market, us_english for us.
Systemlanguageen_fr for the ca market, en for us.
Displaydisplay_brightness_nitsBrightness, from 250 to 1,000 nits. Empty without a built-in display.
Displaydisplay_touchtrue or false; touch screens are rare.
Displaydisplay_finishmatte or glossy. Empty without a built-in display.
Connectivitywifi_standardwifi_5, wifi_6e, wifi_7 or wifi_none.
Connectivitybluetooth_version5.0, 5.3, 5.4 or none.
Connectivityethernet_speed1_gbps, 2.5_gbps, 10_gbps, 25_gbps or none.
Portsusb_a_ports, usb_c_ports, hdmi_portsNumber of ports of each kind.
Powerbattery_whBattery capacity, from 48 to 100 Wh. Only laptops have one; empty otherwise.
Powerpower_adapter_wRating of the adapter or power supply, from 27 to 1,600 W.
Chassischassis_materialaluminum, steel, magnesium_alloy, aluminum_plastic, steel_plastic and a few more.
Camera and securitycamera_typenone, 1080p, 1080p_ir or 1440p_ir.
Camera and securitybiometric_typenone, fingerprint, face_recognition or a combination.
Offerdiscount_percent0, 5, 10 or 15: the discount that turns list_price into current_price.
Offerprice_tierentry below a list price of 1,500 (1,125 in US dollars), otherwise premium.
OfferconditionAlways new.
Offerwarranty_period12_months, 24_months or 36_months.
Lifecycleproduct_age_monthsMonths between release_date and the reference date.
Lifecycleproduct_lifecycle_statuscurrent under 24 months, mature after.
GroupColumnWhat it holds
Displaydisplay_aspect_ratio16:10, 16:9 or 3:2. Empty without a built-in display.
Displaydisplay_hdrnone, hdr10, displayhdr_400, displayhdr_1000 or true_black_500. Empty without a built-in display.
Displaydisplay_color_gamutsrgb_62, srgb_100 or dci_p3_100. Empty without a built-in display.
Processornpu_brand, npu_familyThe maker (Intel, AMD, Apple) and the family of the AI accelerator, such as intel_ai_boost. Empty without one.
Processorcopilot_plus_pctrue from 40 TOPS of AI accelerator, otherwise false.
Connectivitycellular_typenone or 5g. Only laptops can have 5g.
Connectivitydocking_supportnone, usb_c, thunderbolt or thunderbolt_4.
Connectivityethernet_porttrue when ethernet_speed is not none.
Portsthunderbolt_ports, displayport_portsNumber of ports of each kind.
Portscard_reader_typenone, sd, sdxc, sd_uhsii, microsd or nano_sim.
Slotsmemory_slots_total, memory_slots_usedMemory slots; the slots used never exceed the total.
Slotsm2_slots_total, m2_slots_usedM.2 storage slots, with the same rule.
Slotsupgradeability_levelnone, low, medium, high or very_high.
Dimensionswidth_mm, depth_mm, height_mmSize of the machine, from 85 to 615, 56 to 720 and 9 to 470 mm.
Chassischassis_finishThe finish. In the current catalog it takes the same values as chassis_material.
Audio and inputmicrophone_typenone, dual_array, triple_array or quad_array.
Audio and inputspeaker_configurationnone, internal_mono, stereo, quad_speaker or six_speaker.
Audio and inputkeyboard_typeOne of 8, such as backlit_chiclet, backlit_gaming, external_keyboard, wireless_keyboard or none.
Securitytrusted_platformtpm_2_0, apple_secure_enclave or none.
Promotionpromotion_typeNo promotion, percentage discount, seasonal promotion or clearance. There is none when discount_percent is 0.
Promotionpromotion_statusActive when there is a discount, otherwise no promotion.
Price historylowest_price_30d, highest_price_30d, average_price_30dComputed from a short synthetic history: the current price and up to two earlier prices of the list price with a discount of 0 to 15%.
Price historyprice_change_30d_percentChange of the current price against the last earlier price of that history, in percent.
Lifecycleproduct_generationcurrent under 12 months since release, previous under 36, legacy after.
Salespopularity_levelhigh from 100 units sold in 30 days, medium from 30, otherwise low.
Salesunits_sold_30dUnits sold in 30 days: 0 to 5 when out of stock, otherwise about a third of review_count plus 0 to 60.
Salessales_rankRank derived from the units sold; the more units, the better (lower) the rank.
Salesconversion_rateShare of visits that end in a purchase, from 0.005 to 0.15; 0.005 when out of stock.
Salesreturn_rateShare of units returned, around 0.06 to 0.11; the better the rating, the lower.
Distributionseller, seller_typeA seller of the market and its kind (retailer, distributor, refurbisher, authorized reseller, marketplace seller, manufacturer). A manufacturer’s own store only sells its brand.
DistributionwarehouseA warehouse of the market, such as Canada East, Central or West.
Distributionshipping_availabilityUnavailable when out of stock, Limited availability under 5 units, otherwise Available.

The values follow rules of consistency, not market estimates:

  • Each offer takes its parts from a catalog of brands, families, models and generations, and a model only has the processors, graphics, memory, storage, screens and operating systems that the catalog lists for it.
  • A dedicated GPU has memory and an integrated one has none, and a processor never has fewer threads than cores.
  • current_price never exceeds list_price. Prices are computed from the configuration (more memory, storage, cores or graphics memory cost more) and a discount of 0, 5, 10 or 15%; they are not real prices.
  • stock_status is out_of_stock exactly when stock_quantity is 0.
  • release_date falls in the model year and never after the reference date (--as-of-date, 30 September 2026 by default).
  • rating is empty when review_count is 0.

Many rows share a model, since the catalog is finite: a large file repeats configurations, each row with its own product_id, stock and reviews, while sku and mpn repeat with the configuration.

Computer has four anomaly profiles. They keep the clean file and write an altered copy, a change log and a summary (with -d), or only the altered file and its log (with -o).

ProfileWhat it does
dirty_realisticA few defects on a few percent of the rows (table below).
dirty_stressThe same kinds of defect on a larger share of the rows.
unit_variantsOnly the units: 16 becomes 16 GB in some memory, storage and graphics memory cells.
unit_variants_extendedThe same for 14 measured columns (screen size, refresh rate, battery, weight, dimensions and more). It needs --output-profile extended.

dirty_realistic and dirty_stress change the same columns:

ColumnDefectdirty_realisticdirty_stress
memory_gbEmptied2.5%12%
cpu_modelEmptied1.5%8%
release_dateWritten with slashes2%10%
current_priceReplaced by N/A1%6%
stock_statusMisspelled in_stok1.5%8%
gpu_vram_gbSet to 0 on a dedicated GPU4%18%
stock_quantitySet to 0 on an offer in stock3%15%
memory_gbFollowed by GB (16 GB)8%15%
storage_gbFollowed by GB5%10%
gpu_vram_gbFollowed by GB3%6%

The last two columns are the share of rows each defect is requested on. A defect with a condition (a dedicated GPU, an offer in stock) is applied only to the rows that meet it, and the summary counts the others as skipped. Since stock_quantity set to 0 while the status says in_stock contradicts the rule above, such offers are real defects a profile of the file should find.

An unknown profile name stops the command with the list of available names. To get several levels at once, name several profiles with -d: the rows are generated once and each profile makes its own variant.

Terminal window
tabalyst generate --example computer --rows 30000 -d out/ --locales en --anomaly-profile dirty_realistic,dirty_stress

From 5,000 rows, Computer generates the rows in several processes, one per spare processor and at most 6. --workers N sets the number, and --workers 1 keeps a single process. The files are the same whatever the number, so a seed still gives the same data. On one machine with four processors, 1,000,000 offers with an anomaly profile took about three minutes with three processes.

In a terminal, the command shows its progress on one line with the time left; --no-progress hides it. It always ends with a line giving the rows, the total time, the rate, the changed cells and where the time went.