By default, BigML takes the last (numeric or categorical) field in the dataset as the objective field to predict. Please be aware that text and items fields are not currently used as objective fields (target variables) by the BigML models.
If you want to change your objective field you can easily do it through the Dashboard. In the dataset view, click the configure option menu and select the objective field you need.
Another option to change the objective field is, with your dataset open, by clicking the edit icon that appears when mousing over the field you want to change. Then click the highlighted icon and type the name, label and description you like.
The same happens when using the BigML API. If you do not specify an objective field, BigML.io will use the last field in your dataset. Otherwise it can be specified either by passing the field id (e.g., "objective_field": "000004") or by passing the field name (e.g., "objective_field": "device").