Skip to content

Latest commit

 

History

History
executable file
·
95 lines (64 loc) · 2.22 KB

README.md

File metadata and controls

executable file
·
95 lines (64 loc) · 2.22 KB

object

Overview

Operations on objects

Available Operations

create_object

Create a new object

Example Usage

import fabra
from fabra.models import shared

s = fabra.Fabra(
    security=shared.Security(
        api_key_auth="",
    ),
)

req = shared.ObjectInput(
    cursor_field='updated_at',
    destination_id=2,
    display_name='BigQuery',
    end_customer_id_field='end_customer_id',
    frequency=30,
    frequency_units=shared.FrequencyUnits.HOURS,
    namespace='bigquery_dataset',
    object_fields=[
        shared.ObjectField(
            name='event_name',
            type=shared.FieldType.INTEGER,
        ),
        shared.ObjectField(
            name='event_name',
            type=shared.FieldType.BOOLEAN,
        ),
    ],
    primary_key='event_id',
    table_name='events',
)

res = s.object.create_object(req)

if res.create_object_200_application_json_object is not None:
    # handle response

Parameters

Parameter Type Required Description
request shared.ObjectInput ✔️ The request object to use for the request.

Response

operations.CreateObjectResponse

get_objects

Get all objects

Example Usage

import fabra


s = fabra.Fabra(
    security=shared.Security(
        api_key_auth="",
    ),
)


res = s.object.get_objects()

if res.get_objects_200_application_json_object is not None:
    # handle response

Response

operations.GetObjectsResponse