Table of Contents

Connect to Data Warehouse

Data Warehousing integrates data and information collected from various sources, such as breeding performance, environmental sensors, and financial data, into one comprehensive database.

Agritec provides support via API for feeding data warehouses.

Datamart

Datamart is a weekly summary of the main variables for each farm. It includes more than 170 variables such as total born, birthing rate, and mortality, for each farm, each week. It is very convenient for high level analysis such as Power BI or ERP connection.

Table Description URL Format
FactBreeding Daily or weekly performance data for each farm /extern/datamart/FactBreeding tsv
Farms List of all farms with names and its custom attributes /extern/farms json
Targets System and farm targets /extern/datamart/targets json

For example, to get the performance data, the url would be https://api.agritecsoft.com/extern/datamart/FactBreeding

Format: tsv is Tab-Separated Values. It means that each column is separated with a tab character. json is an open data interchange that uses a human-readable format. Depending on the format, you must use Csv.Document or Json.Document in Power BI.

Period End Closes

Period End Close is a monthly snapshot report showing farm inventory numbers and production events, in addition to feed expense and other cost related information. It is inmutable, meaning that once it is closed, numbers will not change. It is very convenient for feeding the financial tools or ERPs.

https://api.agritecsoft.com/extern/extern/farmclosures?mindate={mindate}

Single farm

Gives access to raw farm datasets. Data is available as soon as recorded. It does not include calculated variables such as mortalities, birthing rates, and others.

Tip

Instead of downloading raw data and calculating key indicators like mortalities or birthing rates, we suggest using our Datamart endpoint directly. It offers many precomputed variables that are reliable and sync quickly. Datamart is a dataset with 170 key variables, and is ready to be used directly with your Power BI, Excel, Website, or other apps without the need for a Data Warehouse or calculations.

https://api.agritecsoft.com/extern/farms/{farmCode}/datasets/{dataset}?columns={columns}&startdate={startdate}&enddate={enddate}

Parameters:

  • startdate is the event start date.
  • enddate is the event end date.
  • dataset is the dataset name.
dataset Description
removal See removalex table
female See female table
animal See animal table
service See serviceex table
parity See parityex table
serviceresult See serviceresult table
parityconception See parityconception table
activefemale See femaleex table. Filtered by ISACTIVE=1
groupmovement See groupmovement table
groupinventoryatdate Inventory by group to a specific date. enddate is ignored. Columns: FARMNAME,ID,NUMBER, AGE
grouppackerload Packer loads.Columns: FARMNAME,ID,HARVESTDATE,QTYRECEIVED,LIVEWT,CARCASSES,CARCASSWT,BACKFAT,CARCASSAMOUNT,TRUCKINGEXPENSES
Tip

By implementing incremental loading, you can avoid loading the entire data set into your data model every time you refresh, which can save a significant amount of time and resources. A common strategy is to load each of the last 7 days to include possible modifications or deletions.

Multifarm

This returns the datasets for all farms in the license subscription between two dates. Note this is not available during busy hours, from 7:00 UTC to 14:00 UTC. See Single farm topic for more information.

https://api.agritecsoft.com/extern/multifarm/datasets/{dataset}?columns={columns}&startdate={startdate}&enddate={enddate}

Common uses:

With the following queries, you get detailed information of key events for breeding females:

Dataset Description Usual columns
female Breeding female list IID_FEMALE, ID,GENETICS,ARRIVALDATE,ENTRYDATE,REMOVEDATE,REMOVETYPEID,REMOVEREASON
serviceresult Service result IID_FEMALE,ID,PARITY,NSERVICE,SERVDATE,SERVRESULT,SERVRESULTID,SERVRESULTDATE,SERVRESULTDAYS,SERVMALE1,SERVMALE2,BIRTHINGDATE,TOTALBORN,LIVEBORN,STILLBORN,MUMMIES,ENDLACDATE,TOTALWEANED

For example, to get a list of females arrived on JAN 2022:

https://api.agritecsoft.com/extern/multifarm/dataset/animal?columns=IID_FEMALE, ID,GENETICS,ARRIVALDATE,ENTRYDATE,REMOVEDATE,REMOVETYPEID,REMOVEREASON&startdate=2022-1-1&enddate=2022-1-31

Additionally, you can use other datasets such as parity or wean if you need to expand the information.

See Variables for more information.

Note

In order to minimize the load in our servers, we recommend you use incremental loading, add only strictly necessary columns, and schedule the loads at nights.

Daily Monitor

Fast access to some farm variables in real time by date. See performance table for more information.

DATE
ANIMALSSOLDG1
BIRTHINGS
DEATHSG1
ENTERED
FEMALESWEANED
LIVEBORNSTILLBORN
MALESENTERED
MALESREMOVED
MALESSOLD
MUMMIES
NWEANED
P0FSTSERV
RECORDEDPWDEATHS
REMOVED
REPEATSERVICES
SEMENPURCHASEDDOSES
SERVICES
SOLD
UNMATEDREMOVED
UNMATEDSOLD
WEIGHTSOLDCOUNTG1
WEIGHTSOLDG1

See also

Connect external systems