ODBC Driver for SendGrid

Build 20.0.7587

Recipients

The SendGrid table Recipients.

Table Specific Information

SendGrid has the ability to categorize Recipients with filters defined by the user. Accordingly, you can execute statements to the Recipients table to search by and insert these filters. However, these filters are reported as attributes of the Custom Fields table.

Select

The following query retrieves only the default fields of the Recipients table, not the Custom Fields that you have created. To retrieve the values of the Custom Fields of a Recipient, query the Custom Fields table.

SELECT * FROM Recipients

You can also retrieve all Recipients inside a certain List or a Segment, but it is not possible to filter by both. Use multiple queries instead:

SELECT * FROM Recipients WHERE SegmentId = '1'
SELECT * FROM Recipients WHERE ListId = '2'

You can build criteria depending on a Custom Field. When querying use quotations regardless of type.This kind of filtering is done client side. In this case Age is a CustomField created by the user.

SELECT * FROM Recipients WHERE Age = '30'

Insert

To insert into Recipients Email is required.

You can insert Custom Fields into the Recipients table. See the CustomFields section for more information about how to create custom fields.

INSERT INTO Recipients(Email, FirstName, LastName, Age, Department ... Other Custom Fields as necessary) VALUES('email@domain.com', 'name' ,'surname', '30', 'Education' ... Other Custom Field values)

Update

You can only update from this table by specifying an Id. Additionally, the Email column cannot be updated.

UPDATE Recipients SET Age = '12' WHERE Id = '1'

Delete

You can only delete from this table by specifying an Id.

DELETE FROM Recipients WHERE Id = '1'

Columns

Name Type ReadOnly Description
Id [KEY] String False

This column is dynamic and maps to the corresponding field in the API.

SegmentId Int32 False

This column is dynamic and maps to the corresponding field in the API.

ListId Int32 False

This column is dynamic and maps to the corresponding field in the API.

Email String False

This column is dynamic and maps to the corresponding field in the API.

FirstName String False

This column is dynamic and maps to the corresponding field in the API.

LastName String False

This column is dynamic and maps to the corresponding field in the API.

CreatedAt Datetime True

This column is dynamic and maps to the corresponding field in the API.

LastClicked Datetime True

This column is dynamic and maps to the corresponding field in the API.

LastEmailed Datetime False

This column is dynamic and maps to the corresponding field in the API.

LastOpened Datetime True

This column is dynamic and maps to the corresponding field in the API.

UpdatedAt Datetime True

This column is dynamic and maps to the corresponding field in the API.

Age String False

This column is dynamic and maps to the corresponding field in the API.

Department String False

This column is dynamic and maps to the corresponding field in the API.

University String False

This column is dynamic and maps to the corresponding field in the API.

The SendGrid table Recipients.

Table Specific Information

SendGrid has the ability to categorize Recipients with filters defined by the user. Accordingly, you can execute statements to the Recipients table to search by and insert these filters. However, these filters are reported as attributes of the Custom Fields table.

Select

The following query retrieves only the default fields of the Recipients table, not the Custom Fields that you have created. To retrieve the values of the Custom Fields of a Recipient, query the Custom Fields table.

SELECT * FROM Recipients

You can also retrieve all Recipients inside a certain List or a Segment, but it is not possible to filter by both. Use multiple queries instead:

SELECT * FROM Recipients WHERE SegmentId = '1'
SELECT * FROM Recipients WHERE ListId = '2'

You can build criteria depending on a Custom Field. When querying use quotations regardless of type.This kind of filtering is done client side. In this case Age is a CustomField created by the user.

SELECT * FROM Recipients WHERE Age = '30'

Insert

To insert into Recipients Email is required.

You can insert Custom Fields into the Recipients table. See the CustomFields section for more information about how to create custom fields.

INSERT INTO Recipients(Email, FirstName, LastName, Age, Department ... Other Custom Fields as necessary) VALUES('email@domain.com', 'name' ,'surname', '30', 'Education' ... Other Custom Field values)

Update

You can only update from this table by specifying an Id. Additionally, the Email column cannot be updated.

UPDATE Recipients SET Age = '12' WHERE Id = '1'

Delete

You can only delete from this table by specifying an Id.

DELETE FROM Recipients WHERE Id = '1'

Columns

Name Type Description
Id [KEY] String This column is dynamic and maps to the corresponding field in the API.
AddressLine1 String This column is dynamic and maps to the corresponding field in the API.
AddressLine2 String This column is dynamic and maps to the corresponding field in the API.
City String This column is dynamic and maps to the corresponding field in the API.
Country String This column is dynamic and maps to the corresponding field in the API.
PostalCode String This column is dynamic and maps to the corresponding field in the API.
StateProvinceRegion String This column is dynamic and maps to the corresponding field in the API.
Line String This column is dynamic and maps to the corresponding field in the API.
Facebook String This column is dynamic and maps to the corresponding field in the API.
PhoneNumber String This column is dynamic and maps to the corresponding field in the API.
UniqueName String This column is dynamic and maps to the corresponding field in the API.
WhatsApp String This column is dynamic and maps to the corresponding field in the API.
Email String This column is dynamic and maps to the corresponding field in the API.
FirstName String This column is dynamic and maps to the corresponding field in the API.
LastName String This column is dynamic and maps to the corresponding field in the API.
CreatedAt Datetime This column is dynamic and maps to the corresponding field in the API.
UpdatedAt Datetime This column is dynamic and maps to the corresponding field in the API.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
SegmentId String This column is dynamic and maps to the corresponding field in the API.
ListId String This column is dynamic and maps to the corresponding field in the API.

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7587