CData Cloud offers access to SurveyMonkey across several standard services and protocols, in a cloud-hosted solution. Any application that can connect to a MySQL or SQL Server database can connect to SurveyMonkey through CData Cloud.
CData Cloud allows you to standardize and configure connections to SurveyMonkey as though it were any other OData endpoint, or standard SQL Server/MySQL database.
This page provides a guide to Establishing a Connection to SurveyMonkey in CData Cloud, as well as information on the available resources, and a reference to the available connection properties.
Establishing a Connection shows how to authenticate to SurveyMonkey and configure any necessary connection properties to create a database in CData Cloud
Accessing data from SurveyMonkey through the available standard services and CData Cloud administration is documented in further details in the CData Cloud Documentation.
Connect to SurveyMonkey by selecting the corresponding icon in the Database tab. Required properties are listed under Settings. The Advanced tab lists connection properties that are not typically required.
After obtaining the personal access token, set these properties:
To connect via OAuth from all authentication flows, you must set AuthScheme to OAuth. (This is true regardless of whether you use the embedded OAuth credentials or create a custom OAuth application to connect.)
The following subsections describe how to authenticate to SurveyMonkey from the available OAuth flows. For information about how to create a custom OAuth application, and why you might want to create one even for auth flows that already have embedded OAuth credentials, see Creating a Custom OAuth Application.
For a complete list of connection string properties available in SurveyMonkey, see Connection.
However, you must create a custom OAuth application to connect to SurveyMonkey via the Web. And since custom OAuth applications seamlessly support all three commonly-used auth flows, you might want to create custom OAuth applications (use your own OAuth Application Credentials) for those auth flows anyway.
Custom OAuth applications are useful if you want to:
The Cloud offers the possibility to select surveys as relational tables.
You can create your own Surveys by performing the following steps:
To access the responses to your surveys, append _Responses to your table name, MySurvey_Responses in the query below.
SELECT RespondentId, QuestionText, ChoiceId, ChoiceText, ChoiceWeight FROM MySurvey_Responses
To access your survey questions, append _Questions to your table name, MySurvey_Questions in the query below.
SELECT QuestionId, QuestionFamily, QuestionSubtype, QuestionText, AnswerText FROM MySurvey_Questions
By default, the Cloud attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.
To specify another certificate, see the SSLServerCert property for the available formats to do so.
To connect through the Windows system proxy, you do not need to set any additional connection properties. To connect to other proxies, set ProxyAutoDetect to false.
In addition, to authenticate to an HTTP proxy, set ProxyAuthScheme, ProxyUser, and ProxyPassword, in addition to ProxyServer and ProxyPort.
Set the following properties:
You can access any survey, and related data, in your account. The CData Cloud models entities in the SurveyMonkey API as tables, views, and stored procedures.
These are defined in schema files, which are configuration files with a simple format that makes the schemas easy to extend.
The Cloud offloads as much of the SELECT statement processing as possible to the SurveyMonkey APIs and then processes the rest of the query within the Cloud. The following sections document API limitations and requirements.
The Cloud models surveys and survey statistics as relational Views. Views are tables that are typically read-only.
Stored Procedures are function-like interfaces to the data source. They can be used to search, update, and modify information in the data source.
Views are similar to tables in the way that data is represented; however, views are read-only.
Queries can be executed against a view as if it were a normal table.
Name | Description |
CollectorMessages | Shows information regarding messages sent from a collector. |
CollectorRecipients | Shows information regarding recipients of all or specific messages sent from a collector. |
Collectors | Shows collector information. |
CollectorStats | Shows statistics regarding all or specific messages sent from a collector. |
ContactLists | Shows contact list information. |
Contacts | Shows contact information. |
Pages | Shows information regarding pages for a survey. |
RollupQuestions | Shows rolled up individual stats information for a survey. |
Rollups | Shows rolled up stats information for a survey. |
SurveyQuestions | Shows the available columns for Survey Questions. Append _Questions to your survey name to query survey questions. |
SurveyResponses | Shows the available columns for Survey Responses. Append _Responses to your survey name to query survey responses. |
Surveys | Shows information regarding surveys. |
Shows information regarding messages sent from a collector.
You must specify the collector Id to query from this view. The Cloud will execute other filters client-side in memory.
For example, the following queries are processed server side:
SELECT * FROM CollectorMessages WHERE CollectorId = '175305200' SELECT * FROM CollectorMessages WHERE CollectorId = '175305200' AND Id = '57071816'
Name | Type | Description |
Id [KEY] | String | The Id of the message. |
CollectorId | String | The Id of the collector this message belongs to. |
Status | String | The status of this message. |
Type | String | Message type: 'invite', 'reminder', or 'thank_you'. |
Subject | String | The subject of this message. Only available if resource is being queried by Id. |
Body | String | The html body of this message. Only available if resource is being queried by Id. |
DateCreated | Datetime | Date message was created. Only available if resource is being queried by Id. |
ScheduledDate | Datetime | Date message is scheduled to be sent. If Null, message has not been scheduled to send. Only available if resource is being queried by Id. |
EmbedFirstQuestion | Boolean | Whether to embed the first question to the message. Only available if resource is being queried by Id. |
EditMessageLink | String | The link to the resource to edit this message. Only available if resource is being queried by Id. |
IsBrandingEnabled | Boolean | Whether branding is enabled for this message. Only available if resource is being queried by Id. |
IsScheduled | Boolean | Whether this message is scheduled. Only available if resource is being queried by Id. |
RecipientStatus | String | Recipient filter: 'reminder' or 'thank_you'. Only available if resource is being queried by Id. |
Shows information regarding recipients of all or specific messages sent from a collector.
You must specify the collector Id to query from this view. The Cloud will execute other filters client-side in memory.
For example, the following queries are processed server side:
SELECT * FROM CollectorRecipients WHERE CollectorId = '175305200' SELECT * FROM CollectorRecipients WHERE CollectorId = '175305200' AND MessageId = '57071816' SELECT * FROM CollectorRecipients WHERE CollectorId = '175305200' AND Id = '4496877899'
Name | Type | Description |
Id [KEY] | String | The Id of the recipient. |
CollectorId | String | The Id of the collector this recipient belongs to. |
MessageId | String | The Id of the message this recipient belongs to. Null if it doesn't belong to a specific message. |
String | Email of recipient added to collector. | |
SurveyResponseStatus | String | If the recipient has completed the survey: 'not_responded', 'partially_responded', 'completely_responded'. |
MailStatus | String | If an invite message to the recipient has been: 'sent', 'not_sent', or is 'processing'. |
SurveyLink | String | Link to the survey in the invite. |
RemoveLink | String | Unsubscribe link. |
Shows collector information.
You must specify the survey Id or the collector Id to query from this view. The Cloud will execute other filters client-side in memory.
For example, the following queries are processed server side:
SELECT * FROM Collectors WHERE SurveyId = '126748712' SELECT * FROM Collectors WHERE Id = '175305200'
Name | Type | Description |
Id [KEY] | String | The Id of the collector. |
SurveyId | String | The Id of the Survey this collector belongs to. Only shows up if filtering Collectors by SurveyId. |
Name | String | The name of the collector. |
Status | String | Collector status: 'open' or 'closed'. Only available if resource is being queried by Id. |
Type | String | Collector type: 'weblink' or 'email'. Only available if resource is being queried by Id. |
ThankYouMessage | String | Message for thank you page. Only available if resource is being queried by Id. |
DisqualificationMessage | String | Message for disqualification page. Only available if resource is being queried by Id. |
ClosedPageMessage | String | Message shown when someone visits a closed survey. Only available if resource is being queried by Id. |
DisplaySurveyResults | Boolean | Shows respondents survey instant results when they complete the survey. Only available if resource is being queried by Id. |
EditResponseTypes | String | When respondents can edit their response: 'until_complete', 'never', or 'always'. Only available if resource is being queried by Id. |
AnonymousType | String | Turns off IP tracking. For email collectors, also removes respondent email address and name from response: 'not_anonymous', 'partially_anonymous', 'fully_anonymous'. Only available if resource is being queried by Id. |
SenderEmail | String | Sender email for email collectors. User's email is used if null. Only available if resource is being queried by Id. |
Url | String | If collector is a Web Collector (type 'weblink') then the url for the collector. Only available if resource is being queried by Id. |
RedirectType | String | Determines survey end page behavior: url (redirects to URL set in redirect_url or if none is set, shows standard SurveyMonkey thank you page), close (closes the survey window or tab), or loop (loops the survey back to the beginning, only available for weblink collectors with allow_multiple_responses:true). Only available if resource is being queried by Id. |
RedirectUrl | String | Redirects respondent to this url upon survey completion. Only available if resource is being queried by Id. |
AllowMultipleResponses | Boolean | Allows respondents to take a survey more than once from the same browser on the same computer. Only available for weblink collectors. Only available if resource is being queried by Id. |
PasswordEnabled | Boolean | True if the collector is password protected. Only available for weblink collectors. Only available if resource is being queried by Id. |
DateModified | Datetime | Date collector was last modified. Only available if resource is being queried by Id. |
DateCreated | Datetime | Date collector was created. Only available if resource is being queried by Id. |
CloseDate | Datetime | Close date of collector. Only available if resource is being queried by Id. |
Shows statistics regarding all or specific messages sent from a collector.
You must specify the collector Id to query from this view. The Cloud will execute other filters client-side in memory.
For example, the following queries are processed server side:
SELECT * FROM CollectorStats WHERE CollectorId = '175305200' SELECT * FROM CollectorStats WHERE CollectorId = '175305200' AND MessageId = '57071816'
Name | Type | Description |
CollectorId | String | The Id of the collector these statistics belongs to. |
MessageId | String | The Id of the message these statistics belong to. Null if they don't belong to a specific message. |
Recipients | Integer | Count of recipients included in the stats. |
CompletelyResponded | Integer | Count of recipients who have completed a survey response. |
NotResponded | Integer | Count of recipients who have not started the survey. |
PartiallyResponded | Integer | Count of recipients who have begun the survey but not completed it. |
Opened | Integer | Count of recipients that have opened the message. |
OptedOut | Integer | Count of recipients that have clicked on the opt out link. |
NotSent | Integer | Count of recipients that have been added but their message has not been delivered. |
Sent | Integer | Count of recipients that messages have been sent to. |
Bounced | Integer | Count of recipients with messages that bounced. |
LinkClicked | Integer | Count of messages where the included survey link was clicked on. |
Shows contact list information.
For example, the following queries are processed server side:
SELECT * FROM ContactLists WHERE Id = '123740269'
Name | Type | Description |
Id [KEY] | String | The Id of the contact list. |
Name | String | The name of the contact list. |
Shows contact information.
For example, the following queries are processed server side:
SELECT * FROM Contacts WHERE Id = '2842583326' SELECT * FROM Contacts WHERE ContactListId = '123679423'
Name | Type | Description |
Id [KEY] | String | The Id of the contact. |
ContactListId | String | Use this to filter contacts only from the given ContactListId. |
FirstName | String | The first name of the contact. |
LastName | String | The last name of the contact. |
String | The email of the contact. | |
CustomField1 | String | The value of the first custom field for this contact. |
CustomField2 | String | The value of the second custom field for this contact. |
CustomField3 | String | The value of the third custom field for this contact. |
CustomField4 | String | The value of the fourth custom field for this contact. |
CustomField5 | String | The value of the fifth custom field for this contact. |
CustomField6 | String | The value of the sixth custom field for this contact. |
Shows information regarding pages for a survey.
You must specify the survey Id for this view to see page information for the survey. The Cloud will execute other filters client-side in memory.
For example, the following query is processed server side:
SELECT * FROM Pages WHERE SurveyId = '1231231' SELECT * FROM Pages WHERE SurveyId = '1231231' AND Id = '1234567'
Name | Type | Description |
Id [KEY] | String | The Id of the page. |
SurveyId | String | The Id of the survey. |
Title | String | The title of the page. |
Description | String | The description of the page. |
Position | Integer | The ordinal position of the page. |
QuestionCount | Integer | The number of questions in this page. |
Shows rolled up individual stats information for a survey.
You must specify the survey Id for this view to see roll up stats for the survey. The Cloud will execute other filters client-side in memory.
For example, the following query is processed server side:
SELECT * FROM RollupQuestions WHERE SurveyId = '1231231'
Name | Type | Description |
SurveyId | String | The Id of the survey. |
QuestionId | String | The Id of the question |
ResponseCount | Integer | Number of people which answered by selecting this choice. |
ResponseTextCount | Integer | Number of people which answered by writing in a text. |
ChoiceId | String | The Id of the response. |
Other | Boolean | Whether the selected choice was an other response. |
Ordinal | Int | The number of the order this choice appears in the list of choices. Ordinals are used to get a meaningful representation for stats like maximum, minimum, average, median, and standard deviation. |
Max | Double | The maximum value of the ordinals of the answered choices. |
Min | Double | The minimum value of the ordinals of the answered choices. |
Mean | Double | The average value of the ordinals of the answered choices. |
Median | Double | The median value of the ordinals of the answered choices. |
Std | Double | The standard deviation value of the ordinals of the answered choices. |
Shows rolled up stats information for a survey.
You must specify the survey Id for this view to see roll up stats for the survey. The Cloud will execute other filters client-side in memory.
For example, the following query is processed server side:
SELECT * FROM Rollups WHERE SurveyId = '1231231'
Name | Type | Description |
SurveyId | String | The id of the survey. |
QuestionId | String | The id of the question |
Family | String | The family this question belongs to. |
Subtype | String | The subtype this question belongs to. |
Answered | Integer | Number of people who answered this question by picking one of the given choices. |
AnsweredOther | Integer | Number of people who answered this question by picking the other option. |
Skipped | Integer | Number of people who skipped this question. |
Shows the available columns for Survey Questions. Append _Questions to your survey name to query survey questions.
To query the SurveyQuestions view, you must use the name of the survey and append '_Questions' to the end.
For some question types when the specific id is not applicable the value will be represented as '0'
SELECT * FROM [Volunteer Feedback Template_Questions] SELECT * FROM [Benefits Template_Questions]
Name | Type | Description |
SurveyId | String | The id of the survey. |
QuestionId | String | The id of the question. |
QuestionPosition | Integer | The position of that query in the Survey. |
QuestionText | String | The text of the question. |
QuestionFamily | String | The family of the question. |
QuestionSubtype | String | The subtype of the question. |
ChoiceId | String | The id of the choice. |
ChoiceText | String | The text of the choice. |
ChoiceWeight | String | The weight of the choice. Used in questions of the subtype rating and ranking. Usually it's an ordinal number in incremenenting order. |
ChoiceScore | Int | This field is dynamic and maps to the corresponding report field. |
RowId | String | The id of the row. |
RowText | String | The text of the row. |
ColId | String | The id of the column. |
ColText | String | The text of the column. |
PageId | String | The id of the page. |
PageTitle | String | The title of the page. |
Shows the available columns for Survey Responses. Append _Responses to your survey name to query survey responses.
To query the SurveyResponses view, you must use the name of the survey and append '_Responses' to the end.
The Cloud uses the SurveyMonkey APIs to filter results by the following columns and operators:
For example, the following queries are processed server side:
SELECT * FROM [Volunteer Feedback Template_Responses] SELECT * FROM [Benefits Template_Responses] SELECT * FROM [Benefits Template_Responses] WHERE RespondentId = '1234567890' SELECT * FROM [Benefits Template_Responses] WHERE RespondentId IN ('1234567890', '0987654321') SELECT * FROM [Benefits Template_Responses] WHERE DateCreated > '2018-01-01' AND DateCreated < '2018-01-30' SELECT * FROM [Benefits Template_Responses] WHERE QuestionId = '213965574' SELECT * FROM [Benefits Template_Responses] WHERE QuestionId IN ('213965574', '213963957') SELECT * FROM [Benefits Template_Responses] WHERE TotalTime > 5 AND TotalTime < 10 AND TotalTimeUnit = 'minute' SELECT * FROM [Benefits Template_Responses] WHERE IpAddress = '192.168.0.1' SELECT * FROM [Benefits Template_Responses] WHERE ResponseStatus = 'completed'
Note: When selecting a specific respondent, the aggregate column "Metadata" will be populated with a JsonObject and its elements can be accessed using the JSON_EXTRACT function in the SQLQuery.
Name | Type | Description |
RespondentId | String | The id of the respondent, the person who answered this question. |
SurveyId | String | The id of the survey. |
RecipientId | String | The id of the recipient. |
PageId | String | The id of the page. |
QuestionId | String | The id of the question. |
QuestionText | String | The text of the question. |
ChoiceId | String | The id of the choice. |
ChoiceText | String | The text of the choice. |
ChoiceWeight | String | The weight of the choice. Used in questions of the subtype rating and ranking. Usually it's an ordinal number in incremenenting order. |
ChoiceScore | Int | This field is dynamic and maps to the corresponding report field. |
IsCorrectChoice | Boolean | This field is dynamic and maps to the corresponding report field. |
RowId | String | The id of the row. |
RowText | String | The text of the row. |
ColId | String | The id of the column. |
ColText | String | The text of the column. |
OtherId | String | The id of the other field. |
OtherText | String | The text of the other field. |
AnswerText | String | The text of the answer (in the case of an open-ended question). |
CollectionMode | String | The mode of collection. |
CollectorId | String | The id of the collector the response was taken for. |
TotalTime | String | Total time spent on this survey. |
ResponseStatus | String | The status of the response. Valid values are `completed`, `partial`, `overquota`, and `disqualified`. |
DateCreated | Datetime | Date and time when survey was created. |
DateModified | Datetime | Date and time when survey was last modified. |
CustomValue | Integer | A custom value for this response. |
EditUrl | String | Survey edit URL. |
AnalyzeUrl | String | Survey analyze URL. |
IpAddress | String | The IP address of the respondent. |
QuizCorrectAnswers | Int | This field is dynamic and maps to the corresponding report field. |
QuizIncorrectAnswers | Int | This field is dynamic and maps to the corresponding report field. |
QuizPartiallyCorrectAnswers | Int | This field is dynamic and maps to the corresponding report field. |
QuizTotalScore | Int | This field is dynamic and maps to the corresponding report field. |
QuizTotalQuestions | Int | This field is dynamic and maps to the corresponding report field. |
QuizMaxScore | Int | This field is dynamic and maps to the corresponding report field. |
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 |
TotalTimeUnit | String | The unit of time you want to filter total time values with. Valids units are `second`, `minute`, and `hour`. If not specified, it will use `second` as a default value. This only affects the filtering on SurveyMonkey's end. The values returned for TotalTime from the API will still be in seconds despite what value is being sent for TotalTimeUnit. |
Shows information regarding surveys.
Name | Type | Description |
Id [KEY] | String | The Id of the survey. |
Title | String | The title of the survey. |
Nickname | String | The nickname of the survey. |
Category | String | The Category of the survey. |
DateCreated | Datetime | The Date that the survey was created. |
DateModified | Datetime | The Date that the survey was modified. |
FolderId | String | If specified, adds the survey to the folder with that id. |
IsOwner | Boolean | Is Owner of the survey. |
Language | String | Language of the survey. |
QuestionCount | Int | The number of questions in survey. |
ResponseCount | Int | The number of responses survey has received. |
Stored procedures are function-like interfaces that extend the functionality of the Cloud beyond simple SELECT operations with SurveyMonkey.
Stored procedures accept a list of parameters, perform their intended function, and then return any relevant response data from SurveyMonkey, along with an indication of whether the procedure succeeded or failed.
Name | Description |
You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.
The following tables return database metadata for SurveyMonkey:
The following tables return information about how to connect to and query the data source:
The following table returns query statistics for data modification queries:
Lists the available databases.
The following query retrieves all databases determined by the connection string:
SELECT * FROM sys_catalogs
Name | Type | Description |
CatalogName | String | The database name. |
Lists the available schemas.
The following query retrieves all available schemas:
SELECT * FROM sys_schemas
Name | Type | Description |
CatalogName | String | The database name. |
SchemaName | String | The schema name. |
Lists the available tables.
The following query retrieves the available tables and views:
SELECT * FROM sys_tables
Name | Type | Description |
CatalogName | String | The database containing the table or view. |
SchemaName | String | The schema containing the table or view. |
TableName | String | The name of the table or view. |
TableType | String | The table type (table or view). |
Description | String | A description of the table or view. |
IsUpdateable | Boolean | Whether the table can be updated. |
Describes the columns of the available tables and views.
The following query returns the columns and data types for the MySurvey_Responses table:
SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='MySurvey_Responses'
Name | Type | Description |
CatalogName | String | The name of the database containing the table or view. |
SchemaName | String | The schema containing the table or view. |
TableName | String | The name of the table or view containing the column. |
ColumnName | String | The column name. |
DataTypeName | String | The data type name. |
DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
Length | Int32 | The storage size of the column. |
DisplaySize | Int32 | The designated column's normal maximum width in characters. |
NumericPrecision | Int32 | The maximum number of digits in numeric data. The column length in characters for character and date-time data. |
NumericScale | Int32 | The column scale or number of digits to the right of the decimal point. |
IsNullable | Boolean | Whether the column can contain null. |
Description | String | A brief description of the column. |
Ordinal | Int32 | The sequence number of the column. |
IsAutoIncrement | String | Whether the column value is assigned in fixed increments. |
IsGeneratedColumn | String | Whether the column is generated. |
IsHidden | Boolean | Whether the column is hidden. |
IsArray | Boolean | Whether the column is an array. |
IsReadOnly | Boolean | Whether the column is read-only. |
IsKey | Boolean | Indicates whether a field returned from sys_tablecolumns is the primary key of the table. |
Lists the available stored procedures.
The following query retrieves the available stored procedures:
SELECT * FROM sys_procedures
Name | Type | Description |
CatalogName | String | The database containing the stored procedure. |
SchemaName | String | The schema containing the stored procedure. |
ProcedureName | String | The name of the stored procedure. |
Description | String | A description of the stored procedure. |
ProcedureType | String | The type of the procedure, such as PROCEDURE or FUNCTION. |
Describes stored procedure parameters.
The following query returns information about all of the input parameters for the SelectEntries stored procedure:
SELECT * FROM sys_procedureparameters WHERE ProcedureName='SelectEntries' AND Direction=1 OR Direction=2
Name | Type | Description |
CatalogName | String | The name of the database containing the stored procedure. |
SchemaName | String | The name of the schema containing the stored procedure. |
ProcedureName | String | The name of the stored procedure containing the parameter. |
ColumnName | String | The name of the stored procedure parameter. |
Direction | Int32 | An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters. |
DataTypeName | String | The name of the data type. |
DataType | Int32 | An integer indicating the data type. This value is determined at run time based on the environment. |
Length | Int32 | The number of characters allowed for character data. The number of digits allowed for numeric data. |
NumericPrecision | Int32 | The maximum precision for numeric data. The column length in characters for character and date-time data. |
NumericScale | Int32 | The number of digits to the right of the decimal point in numeric data. |
IsNullable | Boolean | Whether the parameter can contain null. |
IsRequired | Boolean | Whether the parameter is required for execution of the procedure. |
IsArray | Boolean | Whether the parameter is an array. |
Description | String | The description of the parameter. |
Ordinal | Int32 | The index of the parameter. |
Describes the primary and foreign keys.
The following query retrieves the primary key for the MySurvey_Responses table:
SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='MySurvey_Responses'
Name | Type | Description |
CatalogName | String | The name of the database containing the key. |
SchemaName | String | The name of the schema containing the key. |
TableName | String | The name of the table containing the key. |
ColumnName | String | The name of the key column. |
IsKey | Boolean | Whether the column is a primary key in the table referenced in the TableName field. |
IsForeignKey | Boolean | Whether the column is a foreign key referenced in the TableName field. |
PrimaryKeyName | String | The name of the primary key. |
ForeignKeyName | String | The name of the foreign key. |
ReferencedCatalogName | String | The database containing the primary key. |
ReferencedSchemaName | String | The schema containing the primary key. |
ReferencedTableName | String | The table containing the primary key. |
ReferencedColumnName | String | The column name of the primary key. |
Describes the foreign keys.
The following query retrieves all foreign keys which refer to other tables:
SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
Name | Type | Description |
CatalogName | String | The name of the database containing the key. |
SchemaName | String | The name of the schema containing the key. |
TableName | String | The name of the table containing the key. |
ColumnName | String | The name of the key column. |
PrimaryKeyName | String | The name of the primary key. |
ForeignKeyName | String | The name of the foreign key. |
ReferencedCatalogName | String | The database containing the primary key. |
ReferencedSchemaName | String | The schema containing the primary key. |
ReferencedTableName | String | The table containing the primary key. |
ReferencedColumnName | String | The column name of the primary key. |
ForeignKeyType | String | Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key. |
Describes the primary keys.
The following query retrieves the primary keys from all tables and views:
SELECT * FROM sys_primarykeys
Name | Type | Description |
CatalogName | String | The name of the database containing the key. |
SchemaName | String | The name of the schema containing the key. |
TableName | String | The name of the table containing the key. |
ColumnName | String | The name of the key column. |
KeySeq | String | The sequence number of the primary key. |
KeyName | String | The name of the primary key. |
Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.
The following query retrieves all indexes that are not primary keys:
SELECT * FROM sys_indexes WHERE IsPrimary='false'
Name | Type | Description |
CatalogName | String | The name of the database containing the index. |
SchemaName | String | The name of the schema containing the index. |
TableName | String | The name of the table containing the index. |
IndexName | String | The index name. |
ColumnName | String | The name of the column associated with the index. |
IsUnique | Boolean | True if the index is unique. False otherwise. |
IsPrimary | Boolean | True if the index is a primary key. False otherwise. |
Type | Int16 | An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3). |
SortOrder | String | The sort order: A for ascending or D for descending. |
OrdinalPosition | Int16 | The sequence number of the column in the index. |
Returns information on the available connection properties and those set in the connection string.
When querying this table, the config connection string should be used:
jdbc:cdata:surveymonkey:config:
This connection string enables you to query this table without a valid connection.
The following query retrieves all connection properties that have been set in the connection string or set through a default value:
SELECT * FROM sys_connection_props WHERE Value <> ''
Name | Type | Description |
Name | String | The name of the connection property. |
ShortDescription | String | A brief description. |
Type | String | The data type of the connection property. |
Default | String | The default value if one is not explicitly set. |
Values | String | A comma-separated list of possible values. A validation error is thrown if another value is specified. |
Value | String | The value you set or a preconfigured default. |
Required | Boolean | Whether the property is required to connect. |
Category | String | The category of the connection property. |
IsSessionProperty | String | Whether the property is a session property, used to save information about the current connection. |
Sensitivity | String | The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms. |
PropertyName | String | A camel-cased truncated form of the connection property name. |
Ordinal | Int32 | The index of the parameter. |
CatOrdinal | Int32 | The index of the parameter category. |
Hierarchy | String | Shows dependent properties associated that need to be set alongside this one. |
Visible | Boolean | Informs whether the property is visible in the connection UI. |
ETC | String | Various miscellaneous information about the property. |
Describes the SELECT query processing that the Cloud can offload to the data source.
See SQL Compliance for SQL syntax details.
Below is an example data set of SQL capabilities. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.
Name | Description | Possible Values |
AGGREGATE_FUNCTIONS | Supported aggregation functions. | AVG, COUNT, MAX, MIN, SUM, DISTINCT |
COUNT | Whether COUNT function is supported. | YES, NO |
IDENTIFIER_QUOTE_OPEN_CHAR | The opening character used to escape an identifier. | [ |
IDENTIFIER_QUOTE_CLOSE_CHAR | The closing character used to escape an identifier. | ] |
SUPPORTED_OPERATORS | A list of supported SQL operators. | =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR |
GROUP_BY | Whether GROUP BY is supported, and, if so, the degree of support. | NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE |
OJ_CAPABILITIES | The supported varieties of outer joins supported. | NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS |
OUTER_JOINS | Whether outer joins are supported. | YES, NO |
SUBQUERIES | Whether subqueries are supported, and, if so, the degree of support. | NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED |
STRING_FUNCTIONS | Supported string functions. | LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE |
NUMERIC_FUNCTIONS | Supported numeric functions. | ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE |
TIMEDATE_FUNCTIONS | Supported date/time functions. | NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT |
REPLICATION_SKIP_TABLES | Indicates tables skipped during replication. | |
REPLICATION_TIMECHECK_COLUMNS | A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication. | |
IDENTIFIER_PATTERN | String value indicating what string is valid for an identifier. | |
SUPPORT_TRANSACTION | Indicates if the provider supports transactions such as commit and rollback. | YES, NO |
DIALECT | Indicates the SQL dialect to use. | |
KEY_PROPERTIES | Indicates the properties which identify the uniform database. | |
SUPPORTS_MULTIPLE_SCHEMAS | Indicates if multiple schemas may exist for the provider. | YES, NO |
SUPPORTS_MULTIPLE_CATALOGS | Indicates if multiple catalogs may exist for the provider. | YES, NO |
DATASYNCVERSION | The CData Data Sync version needed to access this driver. | Standard, Starter, Professional, Enterprise |
DATASYNCCATEGORY | The CData Data Sync category of this driver. | Source, Destination, Cloud Destination |
SUPPORTSENHANCEDSQL | Whether enhanced SQL functionality beyond what is offered by the API is supported. | TRUE, FALSE |
SUPPORTS_BATCH_OPERATIONS | Whether batch operations are supported. | YES, NO |
SQL_CAP | All supported SQL capabilities for this driver. | SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX |
PREFERRED_CACHE_OPTIONS | A string value specifies the preferred cacheOptions. | |
ENABLE_EF_ADVANCED_QUERY | Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. | YES, NO |
PSEUDO_COLUMNS | A string array indicating the available pseudo columns. | |
MERGE_ALWAYS | If the value is true, The Merge Mode is forcibly executed in Data Sync. | TRUE, FALSE |
REPLICATION_MIN_DATE_QUERY | A select query to return the replicate start datetime. | |
REPLICATION_MIN_FUNCTION | Allows a provider to specify the formula name to use for executing a server side min. | |
REPLICATION_START_DATE | Allows a provider to specify a replicate startdate. | |
REPLICATION_MAX_DATE_QUERY | A select query to return the replicate end datetime. | |
REPLICATION_MAX_FUNCTION | Allows a provider to specify the formula name to use for executing a server side max. | |
IGNORE_INTERVALS_ON_INITIAL_REPLICATE | A list of tables which will skip dividing the replicate into chunks on the initial replicate. | |
CHECKCACHE_USE_PARENTID | Indicates whether the CheckCache statement should be done against the parent key column. | TRUE, FALSE |
CREATE_SCHEMA_PROCEDURES | Indicates stored procedures that can be used for generating schema files. |
The following query retrieves the operators that can be used in the WHERE clause:
SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.
Name | Type | Description |
NAME | String | A component of SQL syntax, or a capability that can be processed on the server. |
VALUE | String | Detail on the supported SQL or SQL syntax. |
Returns information about attempted modifications.
The following query retrieves the Ids of the modified rows in a batch operation:
SELECT * FROM sys_identity
Name | Type | Description |
Id | String | The database-generated Id returned from a data modification operation. |
Batch | String | An identifier for the batch. 1 for a single operation. |
Operation | String | The result of the operation in the batch: INSERTED, UPDATED, or DELETED. |
Message | String | SUCCESS or an error message if the update in the batch failed. |
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.
For more information on establishing a connection, see Establishing a Connection.
Property | Description |
AuthScheme | The type of authentication to use when connecting to SurveyMonkey. |
AccessToken | The Access Token of the SurveyMonkey application. |
Property | Description |
OAuthClientId | The client Id assigned when you register your application with an OAuth authorization server. |
OAuthClientSecret | The client secret assigned when you register your application with an OAuth authorization server. |
OAuthAccessToken | The access token for connecting using OAuth. |
Scope | The Scope supplied from the app settings. |
AccessURL | The URL to get the data from. Depends on the originating datacenter of the SurveyMonkey account. |
Property | Description |
SSLServerCert | The certificate to be accepted from the server when connecting using TLS/SSL. |
Property | Description |
Verbosity | The verbosity level that determines the amount of detail included in the log file. |
Property | Description |
BrowsableSchemas | This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC. |
Property | Description |
MaxRows | Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses. |
Pagesize | The maximum number of results to return per page from SurveyMonkey. |
PseudoColumns | This property indicates whether or not to include pseudo columns as columns to the table. |
ShowCustomVariables | A boolean determining if custom variables and their values should be listed when querying Survey_Responses. |
Timeout | The value in seconds until the timeout error is thrown, canceling the operation. |
UseSimpleNames | Boolean determining if simple names should be used for tables and columns. |
This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.
Property | Description |
AuthScheme | The type of authentication to use when connecting to SurveyMonkey. |
AccessToken | The Access Token of the SurveyMonkey application. |
The type of authentication to use when connecting to SurveyMonkey.
string
"OAuth"
The Access Token of the SurveyMonkey application.
string
""
The Access Token of the SurveyMonkey application.
This section provides a complete list of the OAuth properties you can configure in the connection string for this provider.
Property | Description |
OAuthClientId | The client Id assigned when you register your application with an OAuth authorization server. |
OAuthClientSecret | The client secret assigned when you register your application with an OAuth authorization server. |
OAuthAccessToken | The access token for connecting using OAuth. |
Scope | The Scope supplied from the app settings. |
AccessURL | The URL to get the data from. Depends on the originating datacenter of the SurveyMonkey account. |
The client Id assigned when you register your application with an OAuth authorization server.
string
""
As part of registering an OAuth application, you will receive the OAuthClientId value, sometimes also called a consumer key, and a client secret, the OAuthClientSecret.
The client secret assigned when you register your application with an OAuth authorization server.
string
""
As part of registering an OAuth application, you will receive the OAuthClientId, also called a consumer key. You will also receive a client secret, also called a consumer secret. Set the client secret in the OAuthClientSecret property.
The access token for connecting using OAuth.
string
""
The OAuthAccessToken property is used to connect using OAuth. The OAuthAccessToken is retrieved from the OAuth server as part of the authentication process. It has a server-dependent timeout and can be reused between requests.
The access token is used in place of your user name and password. The access token protects your credentials by keeping them on the server.
The Scope supplied from the app settings.
string
""
The Scope supplied from the app settings. Recommended to be specified when using a custom app.
The URL to get the data from. Depends on the originating datacenter of the SurveyMonkey account.
string
""
The URL to get the data from. Depends on the originating datacenter of the SurveyMonkey account. By default takes the value returned when performing the GetOAuthAccessToken procedure. Change this if you are using the AccessToken AuthScheme and your accounts datacenter AccessURL is different from https://api.surveymonkey.net.
This section provides a complete list of the SSL properties you can configure in the connection string for this provider.
Property | Description |
SSLServerCert | The certificate to be accepted from the server when connecting using TLS/SSL. |
The certificate to be accepted from the server when connecting using TLS/SSL.
string
""
If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.
This property can take the following forms:
Description | Example |
A full PEM Certificate (example shortened for brevity) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
A path to a local file containing the certificate | C:\cert.cer |
The public key (example shortened for brevity) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
The MD5 Thumbprint (hex values can also be either space or colon separated) | ecadbdda5a1529c58a1e9e09828d70e4 |
The SHA1 Thumbprint (hex values can also be either space or colon separated) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
If not specified, any certificate trusted by the machine is accepted.
Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.
This section provides a complete list of the Logging properties you can configure in the connection string for this provider.
Property | Description |
Verbosity | The verbosity level that determines the amount of detail included in the log file. |
The verbosity level that determines the amount of detail included in the log file.
string
"1"
The verbosity level determines the amount of detail that the Cloud reports to the Logfile. Verbosity levels from 1 to 5 are supported. These are detailed in the Logging page.
This section provides a complete list of the Schema properties you can configure in the connection string for this provider.
Property | Description |
BrowsableSchemas | This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC. |
This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
string
""
Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.
This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.
Property | Description |
MaxRows | Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses. |
Pagesize | The maximum number of results to return per page from SurveyMonkey. |
PseudoColumns | This property indicates whether or not to include pseudo columns as columns to the table. |
ShowCustomVariables | A boolean determining if custom variables and their values should be listed when querying Survey_Responses. |
Timeout | The value in seconds until the timeout error is thrown, canceling the operation. |
UseSimpleNames | Boolean determining if simple names should be used for tables and columns. |
Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
int
-1
Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
The maximum number of results to return per page from SurveyMonkey.
int
100
The Pagesize property affects the maximum number of results to return per page from SurveyMonkey. Setting a higher value may result in better performance at the cost of additional memory allocated per page consumed.
This property indicates whether or not to include pseudo columns as columns to the table.
string
""
This setting is particularly helpful in Entity Framework, which does not allow you to set a value for a pseudo column unless it is a table column. The value of this connection setting is of the format "Table1=Column1, Table1=Column2, Table2=Column3". You can use the "*" character to include all tables and all columns; for example, "*=*".
A boolean determining if custom variables and their values should be listed when querying Survey_Responses.
bool
true
A boolean determining if custom variables and their values should be listed when querying Survey_Responses.
The value in seconds until the timeout error is thrown, canceling the operation.
int
60
If Timeout = 0, operations do not time out. The operations run until they complete successfully or until they encounter an error condition.
If Timeout expires and the operation is not yet complete, the Cloud throws an exception.
Boolean determining if simple names should be used for tables and columns.
bool
false
SurveyMonkey tables and columns can use special characters in names that are normally not allowed in standard databases. UseSimpleNames makes the Cloud easier to use with traditional database tools.
Setting UseSimpleNames to true will simplify the names of tables and columns returned. It will enforce a naming scheme such that only alphanumeric characters and the underscore are valid for the displayed table and column names. Any nonalphanumeric characters will be converted to an underscore.