Contacts
Set the name of this table to any of your ContactGroups(GroupName) to create, update, delete, and query Google contacts.
Select
The Contacts table supports the Id in the WHERE clause. The supported operators are '=, IN' for Id.
For example:
SELECT * FROM [My Contacts] WHERE Id = '567931ee88efc109' SELECT * FROM [My Contacts] WHERE Id IN ('567931ee88efc109', '79733d1ee88efc109') SELECT * FROM [My Contacts] WHERE SearchTerms = 'Yash'
Insert
You can insert any field into the Contacts table that is not read-only. You can add multiple values for few specific fields separated by semi-colon.
INSERT INTO [My Contacts] (GivenName, FamilyName, HomeEmailAddresses, WorkEmailAddresses, WorkPhoneNumbers, HomePhoneNumbers, HomeAddresses) VALUES ('Elizabeth', 'Bennet', '[email protected]', '[email protected]', '(206)555-1212', '(206)555-1213', '1600 Amphitheatre Pkwy Mountain View')
To insert organization details for a contact, Use the #TEMP table to insert the fields of the organization. The fields of the organization is present in ContactOrganizations view.
For Example:
INSERT INTO ContactOrganizations#TEMP (Current, Department, Domain, JobDescrption, Location, Name, StartDate) VALUES (true, 'Engineering', 'QA', 'Big Data Engineer', 'Bangalore', 'Tech Mahindra', '2021-03-01') INSERT INTO ContactOrganizations#TEMP (Current, Department, Domain, JobDescrption, Location, Name, StartDate, EndDate) VALUES (false, 'Engineering', 'QA', 'Software Consultant', 'Bangalore', 'CData', '2019-05-23', '2020-02-17') INSERT INTO [My Contacts] (GivenName, Organizations) VALUES ('Karan', 'ContactOrganizations#TEMP')
To insert multiple contacts at once, use the #TEMP table to insert.
For Example:
INSERT INTO MyContacts#TEMP (GivenName, FamilyName, HomeAddresses) VALUES ('Ankit', 'Singh', 'Bangalore India; Indore India') INSERT INTO MyContacts#TEMP (GivenName, MiddleName, HomeAddresses) VALUES ('Aman', '', 'Bangalore India; Indore India') INSERT INTO [My Contacts] (GivenName, HomeAddresses) SELECT GivenName, HomeAddresses FROM MyContacts#TEMP
Update
You can update any field in the Contacts table that is not read-only. You can add multiple values for few specific fields separated by semi-colon.
UPDATE [My Contacts] SET GivenName = 'Elizabeth', FamilyName = 'Bennet', MobilePhoneNumbers = '+355696969999;+355676555001' WHERE Id = '48b8b9158b1db34d' UPDATE [My Contacts] SET HomeAddresses = 'Electronic City Bangalore India; Brilliant Solitaire Indore India' WHERE Id = 'c6545017396039868174'
To update details of multiple contacts at once, use the #TEMP table.
For Example:
INSERT INTO MyContacts#TEMP (Id, GivenName, HomeAddresses) VALUES ('c9197613024342508599', 'Ankit', 'Bangalore India; Indore India') INSERT INTO MyContacts#TEMP (Id, GivenName, HomeAddresses) VALUES ('c2042847992816525584', 'Aman', 'Bangalore India; Indore India') UPDATE [My Contacts] (Id, GivenName, HomeAddresses) SELECT Id, GivenName, HomeAddresses FROM MyContacts#TEMP
Delete
To delete a Contact, the Id is required.
DELETE FROM [My Contacts] WHERE Id = '567931ee88efc109'
To delete multiple contacts at once, use the #TEMP table.
For Example:
INSERT INTO MyContacts#TEMP (Id) VALUES ('c9197613024342508599') INSERT INTO MyContacts#TEMP (Id) VALUES ('c2042847992816525584') DELETE FROM [My Contacts] WHERE EXISTS SELECT Id FROM MyContacts#TEMP
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the contact. |
ResourceName | String | True |
The ResourceName of the contact. |
Etag | String | True |
The ETag of the resource. (Note that the quotation marks are part of the ETag.) |
NamePrefix | String | True |
The honorific prefixes, such as Mrs. or Dr. |
FullName | String | True |
The display name formatted according to the locale specified by the viewer's account |
GivenName | String | False |
The given name of the contact. |
MiddleName | String | False |
The middle name of the contact. |
FamilyName | String | False |
The family name of the contact. |
NameSuffix | String | False |
The honorific suffixes, such as Jr. |
PhoneticNamePrefix | String | True |
The Phonetic honorific prefixes, such as Mrs. or Dr. |
PhoneticFullName | String | False |
The Phonetic display name formatted according to the locale specified by the viewer's account. |
PhoneticGivenName | String | False |
The Phonetic given name of the contact. |
PhoneticMiddleName | String | False |
The Phonetic middle name of the contact. |
PhoneticFamilyName | String | False |
The Phonetic family name of the contact. |
PhoneticNameSuffix | String | False |
The Phonetic honorific suffixes, such as Jr. |
NickNames | String | False |
The nickname of the contact. |
Birthday | Date | False |
The birthday of the contact. The format of the date is yyyy-mm-dd. |
GenderAddressMeAs | String | False |
The type of pronoun that should be used to address the contact. |
Gender | String | False |
The gender for the contact. |
Photos | String | True |
The contact's photo. |
UnlabeledEmailAddresses | String | False |
The unlabeled email addresses of the contact. Multiple email addresses should be separated by semi-colon. |
HomeEmailAddresses | String | False |
The home email addresses of the contact. Multiple email addresses should be separated by semi-colon. |
WorkEmailAddresses | String | False |
The work email addresses of the contact. Multiple email addresses should be separated by semi-colon. |
OtherEmailAddresses | String | False |
The other email addresses of the contact. Multiple email addresses should be separated by semi-colon. |
CustomEmailAddressTypes | String | False |
The custom type of the email address. This attribute should be used along with CustomEmailAddresses. Multiple custom types should be separated by semi-colon. |
CustomEmailAddresses | String | False |
The custom value of the email address. This attribute should be used along with CustomEmailAddressTypes. Multiple custom emailAddresses should be separated by semi-colon. |
UnlabeledPhoneNumbers | String | False |
The unlabeled phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
HomePhoneNumbers | String | False |
The home phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
WorkPhoneNumbers | String | False |
The work phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
MobilePhoneNumbers | String | False |
The mobile phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
OtherPhoneNumbers | String | False |
The homeFax phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
HomeFaxes | String | False |
The workFax phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
WorkFaxes | String | False |
The otherFax phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
OtherFaxes | String | False |
The pager phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
Pagers | String | False |
The workMobile phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
WorkMobilePhoneNumbers | String | False |
The workPager phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
WorkPagers | String | False |
The main phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
MainPhoneNumbers | String | False |
The googleVoice phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
GoogleVoicePhoneNumbers | String | False |
The other phone numbers of the contacts. Multiple phone numbers should be separated by semi-colon. |
CustomPhoneNumberTypes | String | False |
The custom type of the phone number. This attribute should be used along with CustomPhoneNumbers. Multiple custom types should be separated by semi-colon. |
CustomPhoneNumbers | String | False |
The custom value of the phone number. This attribute should be used along with CustomPhoneNumberTypes. Multiple custom phone numbers should be separated by semi-colon. |
UnlabeledAddresses | String | False |
The unlabeled addresses of the contact. Multiple addresses should be separated by semi-colon. |
HomeAddresses | String | False |
The home addresses of the contact. Multiple addresses should be separated by semi-colon. |
WorkAddresses | String | False |
The work addresses of the contact. Multiple addresses should be separated by semi-colon. |
OtherAddresses | String | False |
The other addresses of the contact. Multiple addresses should be separated by semi-colon. |
CustomAddressTypes | String | False |
The custom type of the address. This attribute should be used along with CustomAddresses. Multiple custom types should be separated by semi-colon. |
CustomAddresses | String | False |
The custom value of the address. This attribute should be used along with CustomAddressTypes. Multiple custom emailAddresses should be separated by semi-colon. |
AgeRanges | String | True |
An age range of a contact. |
Biography | String | False |
The short biography of the contact. |
BiographyContentType | String | False |
The content type of the biography of the contact. |
HomeCalendarUrls | String | True |
The home calendar urls of the contact. Multiple calendar urls should be separated by semi-colon. |
FreeBusyCalendarUrls | String | True |
The freeBusy calendar urls of the contact. Multiple calendar urls should be separated by semi-colon. |
WorkCalendarUrls | String | True |
The work calendar urls of the contact. Multiple calendar urls should be separated by semi-colon. |
CustomCalendarUrlTypes | String | True |
The custom type of the address. This attribute should be used along with CustomCalendarUrls. Multiple custom types should be separated by semi-colon. |
CustomCalendarUrls | String | True |
The custom value of the address. This attribute should be used along with CustomCalendarUrlTypes. Multiple custom calendar urls should be separated by semi-colon. |
ClientData | String | False |
The group's client data. |
CoverPhotos | String | True |
A contact's cover photo. |
UnlabeledEvents | String | False |
The dates of unlabeled events. Multiple dates should be separated by semi-colon. |
AnniversaryEvents | String | False |
The dates of anniversary events. Multiple dates should be separated by semi-colon. |
OtherEvents | String | False |
The dates of other events. Multiple dates should be separated by semi-colon. |
CustomEventTypes | String | False |
The custom type of an event. Multiple types should be separated by semi-colon. |
CustomEvents | String | False |
The custom value of an event. Multiple custom event dates should be separated by semi-colon. |
AccountExternalIds | String | False |
The account externalIds of the contact. Multiple externalIds should be separated by semi-colon. |
CustomerExternalIds | String | False |
The customer externalIds of the contact. Multiple externalIds should be separated by semi-colon. |
LoginIdExternalIds | String | False |
The loginId externalIds of the contact. Multiple externalIds should be separated by semi-colon. |
NetworkExternalIds | String | False |
The network externalIds of the contact. Multiple externalIds should be separated by semi-colon. |
OrganizationExternalIds | String | False |
The organization externalIds of the contact. Multiple externalIds should be separated by semi-colon. |
CustomExternalIdTypes | String | False |
The custom type of the externalId. This attribute should be used along with CustomExternalIds. Multiple types should be separated by semi-colon. |
CustomExternalIds | String | False |
The custom value of the externalId. This attribute should be used along with CustomExternalIdTypes. Multiple externalIds should be separated by semi-colon. |
FileAses | String | True |
The name that should be used to sort the contact in a list. |
ImClientsProtocols | String | True |
The semi-colon separated list of ImClients Protocols. Multiple protocols should be separated by semi-colon. |
ImClientsUsernames | String | True |
The semi-colon separated list of ImClients Usernames. Multiple usernames should be separated by semi-colon. |
Interests | String | False |
The contact's interests. |
Locales | String | False |
The contact's locales. |
DeskLocations | String | False |
The desk locations of the contact. Multiple locations should be separated by semi-colon. |
GrewUpLocations | String | False |
The grewUp locations of the contact. Multiple locations should be separated by semi-colon. |
CustomLocationTypes | String | False |
The custom types of the location. The attribute should be used along with CustomLocations. Multiple locations should be separated by semi-colon. |
CustomLocations | String | False |
The custom value of the location. The attribute should be used along with CustomLocationsTypes. Multiple locations should be separated by semi-colon. |
Memberships | String | True |
The resource name for the contact group, assigned by the server. Only contactGroupResourceName can be used for modifying memberships. Any contact group membership can be removed, but only user group or 'myContacts' or 'starred' system groups memberships can be added. A contact must always have at least one contact group membership. |
MiscKeywordTypes | String | False |
The miscellaneous keyword types. Multiple types should be separated by semi-colon. Allowed Values are : TYPE_UNSPECIFIED, OUTLOOK_BILLING_INFORMATION, OUTLOOK_DIRECTORY_SERVER, OUTLOOK_KEYWORD, OUTLOOK_MILEAGE, OUTLOOK_PRIORITY, OUTLOOK_SENSITIVITY, OUTLOOK_SUBJECT, OUTLOOK_USER, HOME, WORK, OTHER The allowed values are TYPE_UNSPECIFIED, OUTLOOK_BILLING_INFORMATION, OUTLOOK_DIRECTORY_SERVER, OUTLOOK_KEYWORD, OUTLOOK_MILEAGE, OUTLOOK_PRIORITY, OUTLOOK_SENSITIVITY, OUTLOOK_SUBJECT, OUTLOOK_USER, HOME, WORK, OTHER. |
MiscKeywordValues | String | False |
The miscellaneous keywords. Multiple miscellaneous keywords should be separated by semi-colon. |
Occupations | String | False |
The contact's occupations |
Organizations | String | False |
The organizations of the contact. |
RelationshipTypes | String | True |
The contact's relation to the other person. This attribute should be used along with RelationValues. Multiple types should be separated by semi-colon. |
RelationshipValues | String | True |
The name of the other person this relation refers to. This attribute should be used along with RelationTypes. Multiple names should be separated by semi-colon. |
UnlabeledSipAddresses | String | False |
The dates of anniversary events. Multiple dates should be separated by semi-colon. |
HomeSipAddresses | String | False |
The home sipAddresses of the contact. Multiple sipAddresses should be separated by semi-colon. |
WorkSipAddresses | String | False |
The work sipAddresses of the contact. Multiple sipAddresses should be separated by semi-colon. |
MobileSipAddresses | String | False |
The mobile sipAddresses of the contact. Multiple sipAddresses should be separated by semi-colon. |
OtherSipAddresses | String | False |
The other sipAddresses of the contact. Multiple sipAddresses should be separated by semi-colon. |
CustomSipAddressTypes | String | False |
The custom type of the sipAddress. This attribute should be used along with CustomSipAddresses. Multiple types should be separated by semi-colon. |
CustomSipAddresses | String | False |
The custom value of the sipAddress. This attribute should be used along with CustomSipAddressTypes. Multiple sipAddresses should be separated by semi-colon. |
Skills | String | True |
The skills that the contact has. |
UnlabeledUrls | String | False |
The unlabeled website urls of the contact. Multiple urls should be separated by semi-colon. |
HomeUrls | String | False |
The home website urls of the contact. Multiple urls should be separated by semi-colon. |
WorkUrls | String | False |
The work website urls of the contact. Multiple urls should be separated by semi-colon. |
BlogUrls | String | False |
The blog website urls of the contact. Multiple urls should be separated by semi-colon. |
ProfileUrls | String | False |
The profile website urls of the contact. Multiple urls should be separated by semi-colon. |
HomePageUrls | String | False |
The homePage website urls of the contact. Multiple urls should be separated by semi-colon. |
FtpUrls | String | False |
The ftp website urls of the contact. Multiple urls should be separated by semi-colon. |
ReservationsUrls | String | False |
The reservations website urls of the contact. Multiple urls should be separated by semi-colon. |
OtherUrls | String | False |
The appInstall Page website urls of the contact. Multiple urls should be separated by semi-colon. |
AppInstallPageUrls | String | False |
The other website urls of the contact. Multiple urls should be separated by semi-colon. |
CustomUrlTypes | String | False |
The custom type of the website url. This attribute values should be used along with CustomUrls. Multiple urls should be separated by semi-colon. |
CustomUrls | String | False |
The custom value of the website url. This attribute values should be used along with CustomUrlTypes. Multiple urls should be separated by semi-colon. |
UnlabeledCountry | String | True |
The unlabeled country of the contact. Multiple addresses should be separated by semi-colon. |
UnlabeledCity | String | True |
The unlabeled city of the contact. Multiple addresses should be separated by semi-colon. |
UnlabeledCountryCode | String | True |
The unlabeled country code of the contact. Multiple addresses should be separated by semi-colon. |
UnlabeledExtendedAddress | String | True |
The unlabeled extended address of the contact. Multiple addresses should be separated by semi-colon. |
UnlabeledPostalCode | String | True |
The unlabeled postal code of the contact. Multiple addresses should be separated by semi-colon. |
UnlabeledRegion | String | True |
The unlabeled region of the contact. Multiple addresses should be separated by semi-colon. |
UnlabeledStreetAddress | String | True |
The unlabeled street address of the contact. Multiple addresses should be separated by semi-colon. |
HomeCountry | String | True |
The home country of the contact. Multiple addresses should be separated by semi-colon. |
HomeCity | String | True |
The home city of the contact. Multiple addresses should be separated by semi-colon. |
HomeCountryCode | String | True |
The home country code of the contact. Multiple addresses should be separated by semi-colon. |
HomeExtendedAddress | String | True |
The home extended address of the contact. Multiple addresses should be separated by semi-colon. |
HomePostalCode | String | True |
The home postal code of the contact. Multiple addresses should be separated by semi-colon. |
HomeRegion | String | True |
The home region of the contact. Multiple addresses should be separated by semi-colon. |
HomeStreetAddress | String | True |
The home street address of the contact. Multiple addresses should be separated by semi-colon. |
WorkCountry | String | True |
The work country of the contact. Multiple addresses should be separated by semi-colon. |
WorkCity | String | True |
The work city of the contact. Multiple addresses should be separated by semi-colon. |
WorkCountryCode | String | True |
The work country code of the contact. Multiple addresses should be separated by semi-colon. |
WorkExtendedAddress | String | True |
The work extended address of the contact. Multiple addresses should be separated by semi-colon. |
WorkPostalCode | String | True |
The work postal code of the contact. Multiple addresses should be separated by semi-colon. |
WorkRegion | String | True |
The work region of the contact. Multiple addresses should be separated by semi-colon. |
WorkStreetAddress | String | True |
The work street address of the contact. Multiple addresses should be separated by semi-colon. |
OtherCountry | String | True |
The other country of the contact. Multiple addresses should be separated by semi-colon. |
OtherCity | String | True |
The other city of the contact. Multiple addresses should be separated by semi-colon. |
OtherCountryCode | String | True |
The other country code of the contact. Multiple addresses should be separated by semi-colon. |
OtherExtendedAddress | String | True |
The other extended address of the contact. Multiple addresses should be separated by semi-colon. |
OtherPostalCode | String | True |
The other postal code of the contact. Multiple addresses should be separated by semi-colon. |
OtherRegion | String | True |
The other region of the contact. Multiple addresses should be separated by semi-colon. |
OtherStreetAddress | String | True |
The other street address of the contact. Multiple addresses should be separated by semi-colon. |
CustomCountry | String | True |
The custom country of the contact. Multiple addresses should be separated by semi-colon. |
CustomCity | String | True |
The custom city of the contact. Multiple addresses should be separated by semi-colon. |
CustomCountryCode | String | True |
The custom country code of the contact. Multiple addresses should be separated by semi-colon. |
CustomExtendedAddress | String | True |
The custom extended address of the contact. Multiple addresses should be separated by semi-colon. |
CustomPostalCode | String | True |
The custom postal code of the contact. Multiple addresses should be separated by semi-colon. |
CustomRegion | String | True |
The custom region of the contact. Multiple addresses should be separated by semi-colon. |
CustomStreetAddress | String | True |
The custom street address of the contact. Multiple addresses should be separated by semi-colon. |
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 |
SearchTerms | String |
The query matches on a contact's names, nickNames, emailAddresses, phoneNumbers, and organizations fields that are from the CONTACT source. Maximum 10 matching rows will be returned. |
ClientDataKey | String |
The client specified key of the client data. |
ClientDataValue | String |
The client specified value of the client data. |