Build a historical inventory snapshot in Google BigQuery using Zoho DataPrep

Build a historical inventory snapshot in Google BigQuery using Zoho DataPrep

Businesses using Zoho Inventory may want to transfer their inventory data to Google BigQuery to maintain an up-to-date data warehouse. While scheduled pipelines help keep BigQuery updated with the latest inventory data, businesses that also need to track stock levels over time can use DataPrep to capture and store daily inventory snapshots.

Solution:
  1. Create a pipeline with Zoho Inventory as the source.
  2. Add Google BigQuery as the destination.
  3. Configure the pipeline to import the required inventory data and schedule it to run daily. Each run exports the latest inventory data to BigQuery.
  4. The pipeline automatically syncs data from Zoho Inventory to Google BigQuery at your configured schedule, keeping your BigQuery data updated with the latest changes.

To maintain a history of stock levels,
  1. Configure a daily import of all required inventory records to capture the current stock levels at each scheduled run.
  2. In the DataPrep Studio page, add a Formula Column using the current_date() function to record the snapshot date.
  3. Export the data to BigQuery in Append mode.
  4. Each daily run adds new rows to BigQuery instead of replacing the previous data. Over time, this builds a historical record of stock levels.


Note: This approach captures stock levels at the time each snapshot is taken; it does not retrieve historical stock data from Zoho Inventory. Warehouse-wise history is possible if the imported inventory data includes stock quantities and the corresponding warehouse name or ID for each record.