CData Cloud は、クラウドホスト型のソリューションで、複数の標準サービスやプロトコルにまたがるGraphQL へのアクセスを実現します。MySQL またはSQL Server データベースに接続できるアプリケーションであれば、CData Cloud を介してGraphQL に接続できます。
CData Cloud により、他のOData エンドポイントや標準SQL Server / MySQL データベースと同じように、GraphQL への接続を標準化し、構成することができます。
このページでは、CData Cloud でのGraphQL への接続の確立 のガイド、利用可能なリソースに関する情報、および使用可能な接続プロパティのリファレンスについて説明します。
接続の確立 は、CData Cloud にデータベースを作成するためのGraphQL への認証方法と必要な接続プロパティの設定方法について示します。
利用可能な標準サービスを経由してGraphQL からデータにアクセスする方法と、CData Cloud の管理については、CData Cloud ドキュメント で詳しく説明します。
Database タブで対応するアイコンを選択して、GraphQL に接続します。必須プロパティはSettings にリストされています。Advanced タブには、通常は必要ない接続プロパティが表示されます。
接続するには以下を設定します。
ヘッドレスサーバーや、Cloud がブラウザを開くことができないその他のマシンにGraphQL データソースを作成するには、別のマシンから認証を行う必要があります。認証は、2段階認証プロセスになります。
オプション1:Verifier code を取得および交換
ヘッドレスマシンで次のプロパティを設定します。
別のマシンから認証してOAuthVerifier 接続プロパティを取得する方法は次のとおりです。
ヘッドレスマシンでは、次の接続プロパティを設定してOAuth 認証値を取得します。
データへの接続
OAuth 設定ファイルが生成されたら、次のプロパティを設定してデータに接続します。
オプション2:OAuth 設定を転送
別のマシンにCloud をインストールして認証し、結果のOAuth 値を転送する方法は次のとおりです。
セカンドマシンに、Cloud をインストールして、次の接続プロパティセットで接続します。
認証する接続をテストします。生成された認証値は、OAuthSettingsLocation で指定された場所に暗号化されて書き込まれます。接続テストに成功したら、OAuth 設定ファイルをヘッドレスマシンにコピーします。ヘッドレスマシンで、次の接続プロパティを設定し、データに接続します。
AWS Cognito のユーザープールに登録されたユーザーでCloud を使用する場合は、以下のプロパティを設定して認証してください。
This section shows how to control the various schemas that the Cloud offers to bridge the gap between relational SQL and GraphQL services.
GraphQL services offer a introspection query service which the Cloud can use to obtain view and column names.
All SCALAR mutation fields are exposed directly, and all object fields are expanded.
The Cloud will automatically scan for available Mutation の使用. Given that there is no method provided by GraphQL for determining which mutations can be used for each table, each mutation is exposed as a stored procedure.
LIST fields are exposed as temporary tables (GraphQL tables of type TEMPORARY_TABLE). The discovered temporary tables can be obtained by querying the sys_tables and sys_tablecolumns system tables.
オペレーション details the process for configuring custom schema files. Setting up these custom schema files is a required step in establishing a connection to GraphQL data.
See システムテーブル to query the current table metadata.
By default, the Cloud will automatically read metadata from GraphQL.
GraphQL services offer a introspection query service which the Cloud can use to obtain view and column names.
A GraphQL introspection query service has a query object at its root. Other objects are nested into the root query object, which can in turn have their own nested objects.
The Cloud reads LIST or Relay Connection type objects as views. If a field is SCALAR, it's read as a column, and if a field is a simple OBJECT, it is expanded.
Set the metadata introspection depth as follows:
The Cloud will automatically scan for available mutations. Given that there is no method provided by GraphQL for determining which mutations can be used for each table, each mutation is exposed as a stored procedure. This replaces the traditional use of INSERT, UPDATE, and DELETE SQL statements when working with GraphQL.
All SCALAR mutation fields are exposed directly, and all object fields are expanded.
LIST fields are exposed as temporary tables (GraphQL tables of type TEMPORARY_TABLE). The discovered temporary tables can be obtained by querying the sys_tables and sys_tablecolumns system tables. These tables contain a RowId and ParentId field to denote the row and housing (parent) table of a given child table.
An example of a mutation is productCreate. Invoke mutations as a stored procedure after first loading the relevant child tables needed for the operation:
INSERT INTO productCreate_metafields#TEMP (namespace,key,value,type) VALUES ('MRproductInfo','ALU','449788022','string')
INSERT INTO productCreate_variants#TEMP (RowId,price,sku,inventoryManagement,weightUnit,weight,options,metafields,inventoryQuantities) VALUES (1,'39.99','38536314-0acb-4d3f-b8ff-a0f2014d2c75','SHOPIFY','POUNDS',1,'L,XL,XXL','productCreate_variants_metafields','productCreate_variants_inventoryQuantities')
INSERT INTO productCreate_variants_metafields#TEMP (ParentId,namespace,key,value,type) VALUES ('1','MRproductInfo','ALU','449788022-M-','string')
INSERT INTO productCreate_variants_metafields#TEMP (ParentId,namespace,key,value,type) VALUES ('1','MRproductInfo','ItemNumber','400000881201','string')
INSERT INTO productCreate_variants_inventoryQuantities#TEMP (ParentId,locationId,availableQuantity) VALUES ('1','gid://shopify/Location/1448280087',5)
INSERT INTO productCreate_media#TEMP (originalSource,alt,mediaContentType) VALUES ('https://static.nike.com/a/images/t_PDP_1280_v1/f_auto,q_auto:eco/qwqfyddzikcgc4ozwigp/revolution-5-road-running-shoes-szF7CS.png','Magic Shoes','IMAGE')
EXECUTE productCreate title='NIKE - 449788022', descriptionHtml='MEN''S SHOES 42-MENS L/S TEES',productType='Staging', vendor='NIKE', published='false', options='size,width',metafields='productCreate_metafields#TEMP', variants='productCreate_variants#TEMP', media='productCreate_media#TEMP'
Custom schemas are defined in configuration files. This chapter outlines the structure of these files.
Note: The GenerateSchemaFiles property enables you to persist table metadata in static schema files that are easy to customize (to persist your changes to column data types, for example). Set this property to "OnStart" to generate schema files for all tables in your database at connection.
Alternatively, set this property to "OnUse" to generate schemas as you execute SELECT queries to tables. It is also possible to create a specific schema file for a table using the CreateSchema stored procedure.
Tables and views are defined by authoring schema files in APIScript. APIScript is a simple configuration language that allows you to define the columns and the behavior of the table. It also has built-in オペレーション that enable you to process GraphQL. In addition to these data processing primitives, APIScript is a full-featured language with constructs for conditionals, looping, etc. However, as shown by the example schema, for most table definitions you will not need to use these features.
Below is a fully functional table schema that models the Labels table and contains all the components you will need to execute SQL to GraphQL data sources.
You can find more information on each of the components of a schema in カラム定義, SELECT 実行.
<rsb:script xmlns:rsb="http://apiscript.com/ns?v1" xmlns:xs="http://www.cdata.com/ns/rsbscript/2" xmlns:other="http://apiscript.com/ns?v1">
<rsb:info title="Labels" desc="Lists information about the different labels you can apply on an issue." other:possiblePaths="{'path':'/repository/labels/edges/node','Name':{'path':'/repository/label'}}" other:paginationObjects="{'labels':{'cursorPath':'after','cursorType':'String','pageSizeArgumentPath':'first','pageSizeArgumentType':'Int','depth':'1','paginationType':'Cursor','isConnection':'True','pageInfo':['endCursor','hasNextPage','hasPreviousPage','startCursor']}}">
<attr name="Id" xs:type="string" key="true" other:relativePath="id" desc="The ID of the label." />
<attr name="RepositoryName" xs:type="string" other:relativePath="name" desc="The name of the repository." other:filter="name:=" other:argumenttype="String!" other:depth="1" references="Repositories.Name" />
<attr name="UserLogin" xs:type="string" desc="The login name of the user." other:filter="owner:=" other:argumenttype="String!" other:depth="1" references="Users.Login" other:mirror="true" other:canBeSliced="true" />
<attr name="Color" xs:type="string" other:relativePath="color" desc="Identifies the label color." />
<attr name="CreatedAt" xs:type="datetime" other:relativePath="createdAt" desc="Identifies the date and time when the label was created." other:orderby="CREATED_AT" />
<attr name="Description" xs:type="string" other:relativePath="description" desc="A brief description of this label." />
<attr name="IsDefault" xs:type="boolean" other:relativePath="isDefault" desc="Indicates whether or not this is a default label." />
<attr name="Name" xs:type="string" other:relativePath="name" desc="Identifies the label name." other:filter="name:=" other:argumenttype="String!" other:orderby="NAME" other:isPathFilter="true" />
<attr name="ResourcePath" xs:type="string" other:relativePath="resourcePath" desc="The HTTP path for this label." />
<attr name="UpdatedAt" xs:type="datetime" other:relativePath="updatedAt" desc="Identifies the date and time when the label was last updated." />
<attr name="Url" xs:type="string" other:relativePath="url" desc="The HTTP URL for this label." />
</rsb:info>
<rsb:script method="GET">
<rsb:push op="graphqladoSelect" />
</rsb:script>
</rsb:script>
The following example shows how to add static headers in the schema file. These headers are added to the request every time the schema file is called.
<rsb:script xmlns:rsb="http://apiscript.com/ns?v1" xmlns:xs="http://www.cdata.com/ns/rsbscript/2" xmlns:other="http://apiscript.com/ns?v1">
...
<input name="Ship1" other:headerName="DynamicValuedHeader" />
<input name="Ship2" other:headerName="DynamicValuedHeader" />
</rsb:info>
<api:set attr="Header:Name#1" value="StaticValuedHeader" />
<api:set attr="Header:Value#1" value="StaticValuedHeader__Value" />
The following example shows how to add dynamic headers in the schema file. These headers are added to the request every time the schema file is called.
<rsb:script xmlns:rsb="http://apiscript.com/ns?v1" xmlns:xs="http://www.cdata.com/ns/rsbscript/2" xmlns:other="http://apiscript.com/ns?v1">
...
<input name="Ship1" other:headerName="DynamicValuedHeader" />
<input name="Ship2" other:headerName="DynamicValuedHeader" />
<input name="Ship3" other:headerName="DynamicValuedHeader2" />
</rsb:info>
<api:set attr="Header:Name#1" value="DynamicValuedHeader" />
<api:set attr="Header:Value#1" value="[_input.Ship1] - [_input.Ship2]" />
SELECT * FROM [Table] WHERE [Ship1] = "Value1" AND [Ship2] = "Value2" AND [DynamicValuedHeader2] = "custom value"
In the above example, the value format of DynamicValuedHeader is parsed by the driver, but for DynamicValuedHeader2, it is the same as the value specified in the query.
The basic attributes of a column are the name of the column, the data type, whether the column is a primary key, the relative path and the depth. The Cloud uses the depth attribute to extract nodes from hierarchical data.
Mark up column attributes in the block of the schema file. You can also provide a description of each attribute using the desc property.
<rsb:script xmlns:rsb="http://apiscript.com/ns?v1" xmlns:xs="http://www.cdata.com/ns/rsbscript/2" xmlns:other="http://apiscript.com/ns?v1">
<rsb:info title="Labels" desc="Lists information about the different labels you can apply on an issue." other:possiblePaths="{'path':'/repository/labels/edges/node','Name':{'path':'/repository/label'}}" other:paginationObjects="{'labels':{'cursorPath':'after','cursorType':'String','pageSizeArgumentPath':'first','pageSizeArgumentType':'Int','depth':'1','paginationType':'Cursor','isConnection':'True','pageInfo':['endCursor','hasNextPage','hasPreviousPage','startCursor']}}">
<attr name="Id" xs:type="string" key="true" other:relativePath="id" desc="The ID of the label." />
<attr name="RepositoryName" xs:type="string" other:relativePath="name" desc="The name of the repository." other:filter="name:=" other:argumenttype="String!" other:depth="1" references="Repositories.Name" />
<attr name="UserLogin" xs:type="string" desc="The login name of the user." other:filter="owner:=" other:argumenttype="String!" other:depth="1" references="Users.Login" other:mirror="true" other:canBeSliced="true" />
<attr name="Color" xs:type="string" other:relativePath="color" desc="Identifies the label color." />
<attr name="CreatedAt" xs:type="datetime" other:relativePath="createdAt" desc="Identifies the date and time when the label was created." other:orderby="CREATED_AT" />
<attr name="Description" xs:type="string" other:relativePath="description" desc="A brief description of this label." />
<attr name="IsDefault" xs:type="boolean" other:relativePath="isDefault" desc="Indicates whether or not this is a default label." />
<attr name="Name" xs:type="string" other:relativePath="name" desc="Identifies the label name." other:filter="name:=" other:argumenttype="String!" other:orderby="NAME" other:isPathFilter="true" />
<attr name="ResourcePath" xs:type="string" other:relativePath="resourcePath" desc="The HTTP path for this label." />
<attr name="UpdatedAt" xs:type="datetime" other:relativePath="updatedAt" desc="Identifies the date and time when the label was last updated." />
<attr name="Url" xs:type="string" other:relativePath="url" desc="The HTTP URL for this label." />
</rsb:info>
<rsb:script method="GET">
<rsb:push op="graphqladoSelect" />
</rsb:script>
</rsb:script>
The following sections provide more detail on using paths to extract columns and rows. To see the column definitions in a complete schema, refer to スキーマのカスタマイズ.
The other:possiblePaths property is used to specify the base paths that select the column's value.
Base paths start with a '/' and contain the full path to the last GraphQL nested object.
<rsb:info title="Labels" desc="Lists information about the different labels you can apply to an issue." other:possiblePaths="{'path':'/repository/labels/edges/node','Name':{'path':'/repository/label'}}" other:paginationObjects="{'labels':{'cursorPath':'after','cursorType':'String','pageSizeArgumentPath':'first','pageSizeArgumentType':'Int','depth':'1''paginationType':'Cursor','isConnection':'True','pageInfo':['endCursor','hasNextPage','hasPreviousPage','startCursor']}}">
The following GraphQL query is based on the above script example:
{ # base path=/repository/labels/edges/node
repository {
labels {
edges {
node {
...
}
}
}
}
}
The other:relativePath property must be specified for each column. This property is used in conjuction with the other:possiblePaths property to build the GraphQL field path.
<attr name="Name" xs:type="string" other:relativePath="name" desc="Identifies the label name." />
Based on the above script example the Cloud will build the following GraphQL query:
{ # base path=/repository/labels/edges/node
repository { # depth=1
labels { # depth=2
edges {
node {
name # path=base path + relative path.
}
}
}
}
}
Use the other:depth property to specify an element inside a specific GraphQL object. The indexes are 1-based. If this attribute is not specified then the default value will be equal to the last nested GraphQL object.
<attr name="RepositoryName" xs:type="string" other:relativePath="name" desc="The name of the repository." other:depth="1" />
The following GraphQL query is built from the above script example:
{ # base path=/repository/labels/edges/node
repository { # depth=1
name # This is mapped to the RepositoryName column
labels { # depth=2
edges {
node {
...
}
}
}
}
}
Use the other:fragment property to specify a group of fields. This property can be used when the GraphQL server returns an array of objects and the Cloud may need to push this info as an aggregate.
<attr name="ColumnValues" xs:type="string" other:relativePath="column_values" desc="Column values." other:fragment="fragment ItemColumnValues on ColumnValue { id \\r\\n value }" />
Based on the above script example, the Cloud will build the following GraphQL query:
query {
items {
column_values {
...ItemColumnValues
}
}
}
fragment ItemColumnValues on ColumnValue {
id
value
}
Use the other:canbesliced property enable slicing behavior in the Cloud
For example,
SELECT * FROM Table WHERE Col IN ('1','2','3')
becomes
SELECT * FROM Table WHERE Col=1 SELECT * FROM Table WHERE Col=2 SELECT * FROM Table WHERE Col=3
Use the other:mirror property to reflect the value specified in the criteria. Use on columns that are not specified in the server response.
For example:
SELECT * FROM Table WHERE Col=X (If other:mirror=true the Cloud will artificially set the value of Col to X for every row.)
Use references to reference the key column of the parent table. Example: If there are two tables Orders and OrderLineItems and the OrderLineItems has a column OrderId, the references field for this column will be "Orders.Id".
Notes:
When a SELECT query is issued, the Cloud executes the GET method of the schema, which invokes the Cloud's built-in operations to process GraphQL. In the GET method, you have control over the request for data. The following procedures show several ways to use this: search the remote data, server-side, with SELECT WHERE, or implement paging.
The following sections show how to translate a SELECT WHERE statement into a GraphQL query to GraphQL APIs. The procedure uses the following statement:
SELECT * FROM <table> WHERE ModifiedAt < '2019-10-30 05:05:36.001'
If this filter is supported on the server via query parameters, you can use the other:filter property of the api:info column definition to specify the desired mapping. For the above query, the Cloud uses this property to map the modifiedAt < '<date>' filter to the query parameter that returns results modified before a given date, and the modifedAt > '<date>' filter to the query parameter that filters the results modified after that date.
To perform this mapping, the Cloud would use the following markup for the modifedAt column definition:
<attr name="ModifiedAt" xs:type="datetime" other:relativePath="modifiedAt" other:argumentType="DateTime" description="When the vendor was last modified." other:filter="modifiedAtAfter:>;modifiedAtBefore:<" />
This query results in the following postdata:
{
"variables": {
"ModifiedAt_modifiedAtBefore": "2019-10-30T09:05:36.001Z"
},
"query": "query($ModifiedAt_modifiedAtBefore:DateTime) {\r\nbusinesses {\r\nedges {\r\nnode {\r\ncustomers(modifiedAtBefore:$ModifiedAt_modifiedAtBefore) {\r\nedges {\r\nnode {\r\nid\r\nmodifiedAt\r\n}\r\n}\r\npageInfo {\r\ntotalPages\r\ncurrentPage\r\n}\r\n}\r\nid\r\n}\r\n}\r\npageInfo {\r\ntotalPages\r\ncurrentPage\r\n}\r\n}\r\n}\r\n"
}
Ex: other:possiblepaths="{'path':'/businesses/edges/node','id':{'path':'/business'}}"
<attr name="Id" xs:type="string" key="true" other:relativePath="id" other:isPathFilter="true" other:filter="id:=" />
SELECT Id, Name, CreatedAt FROM Businesses WHERE Id = 'QnVzaW5M6ZTY4ZDA2MmQtYzkzZS00MGZkLTk4YWUtNDg2YzcxMmExNzFl'is converted to the postdata:
{
"variables": {
"Id_id": "QnVzaW5M6ZTY4ZDA2MmQtYzkzZS00MGZkLTk4YWUtNDg2YzcxMmExNzFl"
},
"query": "query($Id_id:ID) {\r\nbusiness(id:$Id_id) {\r\nid\r\nname\r\ncreatedAt\r\n}\r\n}\r\n"
}
The driver supports two pagination modes.
other:paginationObjects = "{
'labels': {
'cursorPath': 'after',
'cursorType': 'String',
'pageSizeArgumentPath': 'first',
'pageSizeArgumentType': 'Int',
'depth':'1',
'paginationType': 'Cursor',
'isConnection': 'True',
'pageInfo': ['endCursor', 'hasNextPage', 'hasPreviousPage', 'startCursor']
}
}"
The following postdata is generated after processing the other:paginationObjects table extra info specified above:
{
"variables": {
"UserLogin_owner": "testaccount71",
"RepositoryName_name": "test",
"first": <Pagesize>
},
"query": "query($UserLogin_owner:String!, $RepositoryName_name:String!, $first:Int) {\r\nrepository(owner:$UserLogin_owner, name:$RepositoryName_name) {\r\nlabels(first:$first) {\r\nedges {\r\nnode {\r\nid\r\ncolor\r\ncreatedAt\r\ndescription\r\nisDefault\r\nname\r\nresourcePath\r\nupdatedAt\r\nurl\r\n}\r\n}\r\npageInfo {\r\nendCursor\r\nhasNextPage\r\n}\r\n}\r\nname\r\n}\r\n}\r\n"
}
other:paginationObjects="{
'businesses': {
'offsetArgumentPath': 'page',
'offsetArgumentType': 'Int',
'pageSizeArgumentPath': 'pageSize',
'pageSizeArgumentType': 'Int',
'depth':'1',
'paginationType': 'Offset',
'isConnectionObject': 'True',
'pageInfo': ['currentPage', 'totalPages', 'totalCount']
}
}"
The following postdata is generated after processing the other:paginationObjects table extra info specified above:
{
"variables": {
"pageSize_1": <Pagesize>
},
"query": "query($pageSize_1:Int) {\r\nbusinesses(pageSize:$pageSize_1) {\r\nedges {\r\nnode {\r\nid\r\n}\r\n}\r\npageInfo {\r\ntotalPages\r\ncurrentPage\r\n}\r\n}\r\n}\r\n"
}other:paginationObjects="{
'businesses': {
'offsetArgumentPath': 'query/pagination/page',
'offsetArgumentType': 'custom_query',
'pageSizeArgumentPath': 'query/pagination/pageSize',
'pageSizeArgumentType': 'custom_query',
'depth':'1',
'paginationType': 'Offset',
'isConnectionObject': 'True',
'pageInfo': ['currentPage', 'totalPages', 'totalCount']
}
}"
The following postdata is generated after processing the other:paginationObjects table extra info specified above:
{
"variables": {
"query": {
"pagination": {
"pageSize":<Pagesize>
}
}
},
"query": "query($query:custom_query) {\r\nbusinesses(query:$query) {\r\nedges {\r\nnode {\r\nid\r\n}\r\n}\r\npageInfo {\r\ntotalPages\r\ncurrentPage\r\n}\r\n}\r\n}\r\n"
}
<rsb:info title="Labels" desc="Lists information about the different labels you can apply on an issue." other:orderByFormat="{field: {orderByArgumentValue}, direction: {sortOrder}}">
<attr name="CreatedAt" xs:type="datetime" other:relativePath="createdAt" other:orderByFormat="{field: {orderByArgumentValue}, direction: {sortOrder}}" other:orderBy="orderBy:CREATED_AT" /><attr name="CreatedAt" xs:type="datetime" other:relativePath="createdAt" other:orderBy="orderBy:CREATED_AT" />
SELECT Id FROM Labels ORDER BY CreatedAt ASCis converted to this postdata:
{
"variables": {
"first": <Pagesize>
},
"query": "query($first:Int) {\r\nrepository {\r\nlabels(sort:{field: CREATED_AT, direction: ASC}, first:$first) {\r\nedges {\r\nnode {\r\nid\r\n}\r\n}\r\npageInfo {\r\nendCursor\r\nhasNextPage\r\n}\r\n}\r\n}\r\n}\r\n"
}
The Cloud has high-performance operations for processing GraphQL data sources. These operations are platform neutral: Schema files that invoke these operations can be used in both .NET and Java. You can also extend the Cloud with your own operations written in .NET or Java.
The Cloud has the following operations:
| Operation Name | Description | |
| OAuthGetAccessToken | For OAuth 1.0, exchange a request token for an access token. For OAuth 2.0, get an access token or get a new access token with the refresh token. | |
| OAuthGetUserAuthorizationURL | Generates the user authorization URL. OAuth 2.0 will not access the network in this operation. |
The OAuthGetAccessToken operation is an APIScript operation that is used to facilitate the OAuth authentication and refresh flows.
The Cloud includes stored procedures that invoke this operation to complete the OAuth exchange. The following example schema briefly lists some of the typically required inputs before the following sections explain them in more detail.
Invoke the OAuthGetAccessToken with the GetOAuthAccessToken stored procedure. The following inputs are required for most data sources and will provide default values for the connection properties of the same name.
<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2">
<api:info title="GetOAuthAccessToken" description="Obtains the OAuth access token to be used for authentication with various APIs." >
<input name="AuthMode" desc="The OAuth flow. APP or WEB." />
<input name="CallbackURL" desc="The URL to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. " />
<input name="OAuthAccessToken" desc="The request token. OAuth 1.0 only." />
<input name="OAuthAccessTokenSecret" desc="The request token secret. OAuth 1.0 only." />
<input name="Verifier" desc="The verifier code obtained when the user grants permissions to your app." />
<output name="OAuthAccessToken" desc="The access token." />
<output name="OAuthTokenSecret" desc="The access token secret." />
<output name="OAuthRefreshToken" desc="A token that may be used to obtain a new access token." />
</api:info>
<!-- Set OAuthVersion to 1.0 or 2.0. -->
<api:set attr="OAuthVersion" value="MyOAuthVersion" />
<!-- Set RequestTokenURL to the URL where the request for the request token is made. OAuth 1.0 only.-->
<api:set attr="OAuthRequestTokenURL" value="http://MyOAuthRequestTokenURL" />
<!-- Set OAuthAuthorizationURL to the URL where the user logs into the service and grants permissions to the application. -->
<api:set attr="OAuthAuthorizationURL" value="http://MyOAuthAuthorizationURL" />
<!-- Set OAuthAccessTokenURL to the URL where the request for the access token is made. -->
<api:set attr="OAuthAccessTokenURL" value="http://MyOAuthAccessTokenURL" />
<!-- Set GrantType to the authorization grant type. OAuth 2.0 only. -->
<api:set attr="GrantType" value="CODE" />
<!-- Set SignMethod to the signature method used to calculate the signature of the request. OAuth 1.0 only.-->
<api:set attr="SignMethod" value="HMAC-SHA1" />
<api:call op="oauthGetAccessToken">
<api:push/>
</api:call>
</api:script>
You can also use OAuthGetAccessToken to refresh the access token by providing the following inputs:
<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2">
<api:info title="RefreshOAuthAccessToken" description="Refreshes the OAuth access token used for authentication." >
<input name="OAuthRefreshToken" desc="A token that may be used to obtain a new access token." />
<output name="OAuthAccessToken" desc="The authentication token returned." />
<output name="OAuthTokenSecret" desc="The authentication token secret returned. OAuth 1.0 only." />
<output name="OAuthRefreshToken" desc="A token that may be used to obtain a new access token." />
<output name="ExpiresIn" desc="The remaining lifetime on the access token." />
</api:info>
<!-- Set OAuthVersion to 1.0 or 2.0. -->
<api:set attr="OAuthVersion" value="MyOAuthVersion" />
<!-- Set GrantType to REFRESH. OAuth 2.0 only. -->
<api:set attr="GrantType" value="REFRESH" />
<!-- Set SignMethod to the signature method used to calculate the signature of the request. OAuth 1.0 only.-->
<api:set attr="SignMethod" value="HMAC-SHA1" />
<!-- Set OAuthAccessTokenURL to the URL where the request for the access token is made. -->
<api:set attr="OAuthAccessTokenURL" value="http://MyOAuthAccessTokenURL" />
<!-- Set AuthMode to 'WEB' when calling RefreshOAuthAccessToken -->
<api:set attr="AuthMode" value="WEB"/>
<api:call op="oauthGetAccessToken">
<api:push/>
</api:call>
</api:script>
The OAuthGetUserAuthorizationURL is an APIScript operation that is used to facilitate the OAuth authentication flow for Web apps, for offline apps, and in situations where the Cloud is not allowed to open a Web browser. To pass the needed inputs to this operation, define the GetOAuthAuthorizationURL stored procedure. The Cloud can call this internally.
Define stored procedures in .rsb files with the same file name as the schema's title. The example schema briefly lists some of the typically required inputs before the following sections explain them in more detail.
Call OAuthGetUserAuthorizationURL in the GetOAuthAuthorizationURL stored procedure.
<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2">
<api:info title="Get OAuth Authorization URL" description="Obtains the OAuth authorization URL used for authentication with various APIs." >
<input name="CallbackURL" desc="The URL to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access. " />
<output name="URL" desc="The URL where the user logs in and is prompted to grant permissions to the app. " />
<output name="OAuthAccessToken" desc="The request token. OAuth 1.0 only." />
<output name="OAuthTokenSecret" desc="The request token secret. OAuth 1.0 only." />
</api:info>
<!-- Set OAuthVersion to 1.0 or 2.0. -->
<api:set attr="OAuthVersion" value="MyOAuthVersion" />
<!-- Set ResponseType to the desired authorization grant type. OAuth 2.0 only.-->
<api:set attr="ResponseType" value="code" />
<!-- Set SignMethod to the signature method used to calculate the signature. OAuth 1.0 only.-->
<api:set attr="SignMethod" value="HMAC-SHA1" />
<!-- Set OAuthAuthorizationURL to the URL where the user logs into the service and grants permissions to the application. -->
<api:set attr="OAuthAuthorizationURL" value="http://MyOAuthAuthorizationURL" />
<!-- Set OAuthAccessTokenURL to the URL where the request for the access token is made. -->
<api:set attr="OAuthAccessTokenURL" value="http://MyOAuthAccessTokenURL"/>
<!-- Set RequestTokenURL to the URL where the request for the request token is made. OAuth 1.0 only.-->
<api:set attr="OAuthRequestTokenURL" value="http://MyOAuthRequestTokenURL" />
<api:call op="oauthGetUserAuthorizationUrl">
<api:push/>
</api:call>
</api:script>
<p>
このセクションで説明されているシステムテーブルをクエリして、スキーマ情報、データソース機能に関する情報、およびバッチ操作の統計にアクセスできます。
以下のテーブルは、GraphQL のデータベースメタデータを返します。
以下のテーブルは、データソースへの接続方法およびクエリ方法についての情報を返します。
次のテーブルは、データ変更クエリのクエリ統計を返します。
利用可能なデータベースをリストします。
次のクエリは、接続文字列で決定されるすべてのデータベースを取得します。
SELECT * FROM sys_catalogs
| Name | Type | Description |
| CatalogName | String | データベース名。 |
利用可能なスキーマをリストします。
次のクエリは、すべての利用可能なスキーマを取得します。
SELECT * FROM sys_schemas
| Name | Type | Description |
| CatalogName | String | データベース名。 |
| SchemaName | String | スキーマ名。 |
利用可能なテーブルをリストします。
次のクエリは、利用可能なテーブルおよびビューを取得します。
SELECT * FROM sys_tables
| Name | Type | Description |
| CatalogName | String | テーブルまたはビューを含むデータベース。 |
| SchemaName | String | テーブルまたはビューを含むスキーマ。 |
| TableName | String | テーブル名またはビュー名。 |
| TableType | String | テーブルの種類(テーブルまたはビュー)。 |
| Description | String | テーブルまたはビューの説明。 |
| IsUpdateable | Boolean | テーブルが更新可能かどうか。 |
利用可能なテーブルおよびビューのカラムについて説明します。
次のクエリは、Users テーブルのカラムとデータ型を返します。
SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='Users'
| Name | Type | Description |
| CatalogName | String | テーブルまたはビューを含むデータベースの名前。 |
| SchemaName | String | テーブルまたはビューを含むスキーマ。 |
| TableName | String | カラムを含むテーブルまたはビューの名前。 |
| ColumnName | String | カラム名。 |
| DataTypeName | String | データ型の名前。 |
| DataType | Int32 | データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。 |
| Length | Int32 | カラムのストレージサイズ。 |
| DisplaySize | Int32 | 指定されたカラムの通常の最大幅(文字数)。 |
| NumericPrecision | Int32 | 数値データの最大桁数。文字データおよび日時データの場合は、カラムの長さ(文字数)。 |
| NumericScale | Int32 | カラムのスケール(小数点以下の桁数)。 |
| IsNullable | Boolean | カラムがNull を含められるかどうか。 |
| Description | String | カラムの簡単な説明。 |
| Ordinal | Int32 | カラムのシーケンスナンバー。 |
| IsAutoIncrement | String | カラムに固定増分値が割り当てられるかどうか。 |
| IsGeneratedColumn | String | 生成されたカラムであるかどうか。 |
| IsHidden | Boolean | カラムが非表示かどうか。 |
| IsArray | Boolean | カラムが配列かどうか。 |
| IsReadOnly | Boolean | カラムが読み取り専用かどうか。 |
| IsKey | Boolean | sys_tablecolumns から返されたフィールドがテーブルの主キーであるかどうか。 |
利用可能なストアドプロシージャをリストします。
次のクエリは、利用可能なストアドプロシージャを取得します。
SELECT * FROM sys_procedures
| Name | Type | Description |
| CatalogName | String | ストアドプロシージャを含むデータベース。 |
| SchemaName | String | ストアドプロシージャを含むスキーマ。 |
| ProcedureName | String | ストアドプロシージャの名前。 |
| Description | String | ストアドプロシージャの説明。 |
| ProcedureType | String | PROCEDURE やFUNCTION などのプロシージャのタイプ。 |
ストアドプロシージャパラメータについて説明します。
次のクエリは、SelectEntries ストアドプロシージャのすべての入力パラメータについての情報を返します。
SELECT * FROM sys_procedureparameters WHERE ProcedureName='SelectEntries' AND Direction=1 OR Direction=2
| Name | Type | Description |
| CatalogName | String | ストアドプロシージャを含むデータベースの名前。 |
| SchemaName | String | ストアドプロシージャを含むスキーマの名前。 |
| ProcedureName | String | パラメータを含むストアドプロシージャの名前。 |
| ColumnName | String | ストアドプロシージャパラメータの名前。 |
| Direction | Int32 | パラメータのタイプに対応する整数値:input (1)。input/output (2)、またはoutput(4)。input/output タイプパラメータは、入力パラメータと出力パラメータの両方になれます。 |
| DataTypeName | String | データ型の名前。 |
| DataType | Int32 | データ型を示す整数値。この値は、実行時に環境に基づいて決定されます。 |
| Length | Int32 | 文字データの場合は、許可される文字数。数値データの場合は、許可される桁数。 |
| NumericPrecision | Int32 | 数値データの場合は最大精度。文字データおよび日時データの場合は、カラムの長さ(文字数)。 |
| NumericScale | Int32 | 数値データの小数点以下の桁数。 |
| IsNullable | Boolean | パラメータがNull を含められるかどうか。 |
| IsRequired | Boolean | プロシージャの実行にパラメータが必要かどうか。 |
| IsArray | Boolean | パラメータが配列かどうか。 |
| Description | String | パラメータの説明。 |
| Ordinal | Int32 | パラメータのインデックス。 |
主キーおよび外部キーについて説明します。
次のクエリは、Users テーブルの主キーを取得します。
SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='Users'
| Name | Type | Description |
| CatalogName | String | キーを含むデータベースの名前。 |
| SchemaName | String | キーを含むスキーマの名前。 |
| TableName | String | キーを含むテーブルの名前。 |
| ColumnName | String | キーカラムの名前 |
| IsKey | Boolean | カラムがTableName フィールドで参照されるテーブル内の主キーかどうか。 |
| IsForeignKey | Boolean | カラムがTableName フィールドで参照される外部キーかどうか。 |
| PrimaryKeyName | String | 主キーの名前。 |
| ForeignKeyName | String | 外部キーの名前。 |
| ReferencedCatalogName | String | 主キーを含むデータベース。 |
| ReferencedSchemaName | String | 主キーを含むスキーマ。 |
| ReferencedTableName | String | 主キーを含むテーブル。 |
| ReferencedColumnName | String | 主キーのカラム名。 |
外部キーについて説明します。
次のクエリは、他のテーブルを参照するすべての外部キーを取得します。
SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
| 名前 | タイプ | 説明 |
| CatalogName | String | キーを含むデータベースの名前。 |
| SchemaName | String | キーを含むスキーマの名前。 |
| TableName | String | キーを含むテーブルの名前。 |
| ColumnName | String | キーカラムの名前 |
| PrimaryKeyName | String | 主キーの名前。 |
| ForeignKeyName | String | 外部キーの名前。 |
| ReferencedCatalogName | String | 主キーを含むデータベース。 |
| ReferencedSchemaName | String | 主キーを含むスキーマ。 |
| ReferencedTableName | String | 主キーを含むテーブル。 |
| ReferencedColumnName | String | 主キーのカラム名。 |
| ForeignKeyType | String | 外部キーがインポート(他のテーブルを指す)キーかエクスポート(他のテーブルから参照される)キーかを指定します。 |
主キーについて説明します。
次のクエリは、すべてのテーブルとビューから主キーを取得します。
SELECT * FROM sys_primarykeys
| Name | Type | Description |
| CatalogName | String | キーを含むデータベースの名前。 |
| SchemaName | String | キーを含むスキーマの名前。 |
| TableName | String | キーを含むテーブルの名前。 |
| ColumnName | String | キーカラムの名前。 |
| KeySeq | String | 主キーのシーケンス番号。 |
| KeyName | String | 主キーの名前。 |
利用可能なインデックスについて説明します。インデックスをフィルタリングすることで、より高速なクエリ応答時間でセレクティブクエリを記述できます。
次のクエリは、主キーでないすべてのインデックスを取得します。
SELECT * FROM sys_indexes WHERE IsPrimary='false'
| Name | Type | Description |
| CatalogName | String | インデックスを含むデータベースの名前。 |
| SchemaName | String | インデックスを含むスキーマの名前。 |
| TableName | String | インデックスを含むテーブルの名前。 |
| IndexName | String | インデックス名。 |
| ColumnName | String | インデックスに関連付けられたカラムの名前。 |
| IsUnique | Boolean | インデックスが固有の場合はTrue。そうでない場合はFalse。 |
| IsPrimary | Boolean | インデックスが主キーの場合はTrue。そうでない場合はFalse。 |
| Type | Int16 | インデックスタイプに対応する整数値:statistic (0)、clustered (1)、hashed (2)、またはother (3)。 |
| SortOrder | String | 並べ替え順序:A が昇順、D が降順。 |
| OrdinalPosition | Int16 | インデックスのカラムのシーケンスナンバー。 |
利用可能な接続プロパティと、接続文字列に設定されている接続プロパティに関する情報を返します。
次のクエリは、接続文字列に設定されている、あるいはデフォルト値で設定されているすべての接続プロパティを取得します。
SELECT * FROM sys_connection_props WHERE Value <> ''
| Name | Type | Description |
| Name | String | 接続プロパティ名。 |
| ShortDescription | String | 簡単な説明。 |
| Type | String | 接続プロパティのデータ型。 |
| Default | String | 明示的に設定されていない場合のデフォルト値。 |
| Values | String | 可能な値のカンマ区切りリスト。別な値が指定されていると、検証エラーがスローされます。 |
| Value | String | 設定した値またはあらかじめ設定されたデフォルト。 |
| Required | Boolean | プロパティが接続に必要かどうか。 |
| Category | String | 接続プロパティのカテゴリ。 |
| IsSessionProperty | String | プロパティが、現在の接続に関する情報を保存するために使用されるセッションプロパティかどうか。 |
| Sensitivity | String | プロパティの機密度。これは、プロパティがロギングおよび認証フォームで難読化されているかどうかを通知します。 |
| PropertyName | String | キャメルケースの短縮形の接続プロパティ名。 |
| Ordinal | Int32 | パラメータのインデックス。 |
| CatOrdinal | Int32 | パラメータカテゴリのインデックス。 |
| Hierarchy | String | このプロパティと一緒に設定する必要がある、関連のある依存プロパティを表示します。 |
| Visible | Boolean | プロパティが接続UI に表示されるかどうかを通知します。 |
| ETC | String | プロパティに関するその他のさまざまな情報。 |
Cloud がデータソースにオフロードできるSELECT クエリ処理について説明します。
SQL 構文の詳細については、SQL 準拠 を参照してください。
以下はSQL 機能のサンプルデータセットです。 SELECT 機能のいくつかの側面がサポートされている場合には、カンマ区切りのリストで返されます。サポートされていない場合、カラムにはNO が入ります。
| 名前 | 説明 | 有効な値 |
| AGGREGATE_FUNCTIONS | サポートされている集計関数。 | AVG, COUNT, MAX, MIN, SUM, DISTINCT |
| COUNT | COUNT 関数がサポートされているかどうか。 | YES, NO |
| IDENTIFIER_QUOTE_OPEN_CHAR | 識別子をエスケープするための開始文字。 | [ |
| IDENTIFIER_QUOTE_CLOSE_CHAR | 識別子をエスケープするための終了文字。 | ] |
| SUPPORTED_OPERATORS | サポートされているSQL 演算子。 | =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR |
| GROUP_BY | GROUP BY がサポートされているかどうか。サポートされている場合、どのレベルでサポートされているか。 | NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE |
| OJ_CAPABILITIES | サポートされている外部結合の種類。 | NO, LEFT, RIGHT, FULL, INNER, NOT_ORDERED, ALL_COMPARISON_OPS |
| OUTER_JOINS | 外部結合がサポートされているかどうか。 | YES, NO |
| SUBQUERIES | サブクエリがサポートされているかどうか。サポートされていれば、どのレベルでサポートされているか。 | NO, COMPARISON, EXISTS, IN, CORRELATED_SUBQUERIES, QUANTIFIED |
| 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 | サポートされている数値関数。 | 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 | サポートされている日付および時刻関数。 | 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 | レプリケーション中にスキップされたテーブルを示します。 | |
| REPLICATION_TIMECHECK_COLUMNS | レプリケーション中に更新判断のカラムとして使用するかどうかを、(指定された順に)チェックするカラムのリストを含む文字列の配列。 | |
| IDENTIFIER_PATTERN | 識別子としてどの文字列が有効かを示す文字列値。 | |
| SUPPORT_TRANSACTION | プロバイダーが、コミットやロールバックなどのトランザクションをサポートしているかどうかを示します。 | YES, NO |
| DIALECT | 使用するSQL ダイアレクトを示します。 | |
| KEY_PROPERTIES | Uniform データベースを特定するプロパティを示します。 | |
| SUPPORTS_MULTIPLE_SCHEMAS | プロバイダー用に複数のスキームが存在するかどうかを示します。 | YES, NO |
| SUPPORTS_MULTIPLE_CATALOGS | プロバイダー用に複数のカタログが存在するかどうかを示します。 | YES, NO |
| DATASYNCVERSION | このドライバーにアクセスするために必要な、CData Sync のバージョン。 | Standard, Starter, Professional, Enterprise |
| DATASYNCCATEGORY | このドライバーのCData Sync カテゴリ。 | Source, Destination, Cloud Destination |
| SUPPORTSENHANCEDSQL | API で提供されている以上の、追加SQL 機能がサポートされているかどうか。 | TRUE, FALSE |
| SUPPORTS_BATCH_OPERATIONS | バッチ操作がサポートされているかどうか。 | YES, NO |
| SQL_CAP | このドライバーでサポートされているすべてのSQL 機能。 | 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 | 使用したいcacheOptions を指定する文字列値。 | |
| ENABLE_EF_ADVANCED_QUERY | ドライバーがEntity Framework の高度なクエリをサポートしているかどうかを示します。サポートしていなければ、クエリはクライアントサイドで処理されます。 | YES, NO |
| PSEUDO_COLUMNS | 利用可能な疑似カラムを示す文字列の配列。 | |
| MERGE_ALWAYS | 値がtrue であれば、CData Sync 内でMerge Model が強制的に実行されます。 | TRUE, FALSE |
| REPLICATION_MIN_DATE_QUERY | レプリケート開始日時を返すSELECT クエリ。 | |
| REPLICATION_MIN_FUNCTION | サーバーサイドでmin を実行するために使用する式名を、プロバイダーが指定できるようになります。 | |
| REPLICATION_START_DATE | レプリケート開始日を、プロバイダーが指定できるようになります。 | |
| REPLICATION_MAX_DATE_QUERY | レプリケート終了日時を返すSELECT クエリ。 | |
| REPLICATION_MAX_FUNCTION | サーバーサイドでmax を実行するために使用する式名を、プロバイダーが指定できるようになります。 | |
| IGNORE_INTERVALS_ON_INITIAL_REPLICATE | 初回のレプリケートで、レプリケートをチャンクに分割しないテーブルのリスト。 | |
| CHECKCACHE_USE_PARENTID | CheckCache 構文を親キーカラムに対して実行するかどうかを示します。 | TRUE, FALSE |
| CREATE_SCHEMA_PROCEDURES | スキーマファイルの生成に使用できる、ストアドプロシージャを示します。 |
次のクエリは、WHERE 句で使用できる演算子を取得します。
SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'
WHERE 句では、個々のテーブルの制限や要件が異なる場合がありますので注意してください。詳しくは、データモデル セクションを参照してください。
| Name | Type | Description |
| NAME | String | SQL 構文のコンポーネント、またはサーバー上で処理できる機能。 |
| VALUE | String | サポートされるSQL またはSQL 構文の詳細。 |
試行された変更に関する情報を返します。
次のクエリは、バッチ処理で変更された行のId を取得します。
SELECT * FROM sys_identity
| Name | Type | Description |
| Id | String | データ変更処理から返された、データベース生成Id。 |
| Batch | String | バッチの識別子。1 は単一処理。 |
| Operation | String | バッチ内の処理の結果:INSERTED、UPDATED、またはDELETED。 |
| Message | String | SUCCESS、またはバッチ内の更新が失敗した場合のエラーメッセージ。 |
利用可能なシステム情報を説明します。
次のクエリは、すべてのカラムを取得します。
SELECT * FROM sys_information
| Name | Type | Description |
| Product | String | 製品名。 |
| Version | String | 製品のバージョン番号。 |
| Datasource | String | 製品が接続するデータソースの名前。 |
| NodeId | String | 製品がインストールされているマシンの固有識別子。 |
| HelpURL | String | 製品のヘルプドキュメントのURL。 |
| License | String | 製品のライセンス情報。(この情報が利用できない場合、この項目は空白のままか「N/A」と表示されます。) |
| Location | String | 製品のライブラリが格納されているファイルパスの場所。 |
| Environment | String | 製品が現在稼働している環境またはランタイムのバージョン。 |
| DataSyncVersion | String | 本コネクタを使用するために必要なCData Sync のティア。 |
| DataSyncCategory | String | CData Sync 機能のカテゴリ(例:Source、Destination)。 |
ストアドプロシージャはファンクションライクなインターフェースで、GraphQL の単純なSELECT 処理にとどまらずCloud の機能を拡張します。
ストアドプロシージャは、パラメータのリストを受け取り、目的の機能を実行し、プロシージャが成功したか失敗したかを示すとともにGraphQL から関連するレスポンスデータを返します。
| Name | Description |
| プロパティ | 説明 |
| AuthScheme | The type of authentication to use when connecting to remote services. |
| URL | The URL of the GraphQL service. |
| User | 認証するGraphQL ユーザーアカウントのユーザーID を指定します。 |
| Password | 認証するユーザーアカウントのパスワードを指定します。 |
| プロパティ | 説明 |
| AWSCognitoRegion | AWS Cognito のホスティングリージョン。 |
| AWSUserPoolId | ユーザープールのID。 |
| AWSUserPoolClientAppId | ユーザープールのアプリクライアントID。 |
| AWSUserPoolClientAppSecret | ユーザープールのアプリクライアントシークレット。(オプション) |
| プロパティ | 説明 |
| OAuthClientId | カスタムOAuth アプリケーションの作成時に割り当てられたクライアントId を指定します。(コンシューマーキーとも呼ばれます。)このID は、カスタムアプリケーションをOAuth 認可サーバーに登録します。 |
| OAuthClientSecret | カスタムOAuth アプリケーションの作成時に割り当てられたクライアントシークレットを指定します。( コンシューマーシークレット とも呼ばれます。)このシークレットは、カスタムアプリケーションをOAuth 認可サーバーに登録します。 |
| OAuthGrantType | 選択したOAuth フローのグラント種別を指定します。 この値は、OAuth カスタムアプリケーション作成時に設定されたグラント種別と同じである必要があります。 |
| OAuthAuthorizationURL | OAuth サービスの認可URL。 |
| OAuthAccessTokenURL | OAuth アクセストークンを取得するURL。 |
| AuthToken | OAuth アクセストークンをリクエストおよび取得するために使用される認証トークン。 |
| AuthKey | OAuth アクセストークンをリクエストおよび取得するために使用される認証シークレット。 |
| プロパティ | 説明 |
| SSLServerCert | TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。 |
| プロパティ | 説明 |
| Verbosity | ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。 |
| プロパティ | 説明 |
| BrowsableSchemas | レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
| ExpandArgumentsDepth | This property is used to determine how far the provider should search for columns inside the arguments of type INPUT_OBJECT. |
| ExpandTablesDepth | This property is used to determine the depth of the child tables. |
| ExpandTemporaryTablesDepth | This property is used to determine the depth of the child temporary tables. Only works if ExposeDynamicProcedures is set to true. |
| ExpandColumnsDepth | This property is used to determine how far the provider should search for columns inside the GraphQL objects. |
| IncludeDeprecatedMetadata | This property is used to determine whether the provider should expose deprecated tables and columns or not. |
| ExposeDynamicProcedures | This property is used to determine whether the provider should expose mutations as dynamic procedures or not. |
| ExposeObjectTables | This property is used to determine the extent to which the provider exposes GraphQL object type fields as tables. |
| プロパティ | 説明 |
| CustomHeaders | 他のプロパティ(ContentType やFrom など)から作成されたリクエストヘッダーに追加する、追加HTTP ヘッダーを指定します。このプロパティは、特殊または非標準のAPI 用にリクエストをカスタマイズするために使用します。 |
| MaxRows | 集計やGROUP BY を使用しないクエリで返される最大行数を指定します。 |
| Pagesize | The maximum number of results to return per page from GraphQL. |
| PseudoColumns | テーブルカラムとして公開する擬似カラムを指定します。'TableName=ColumnName;TableName=ColumnName' という形式を使用します。デフォルトは空の文字列で、このプロパティを無効にします。 |
| Timeout | provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。デフォルトは60秒です。タイムアウトを無効にするには0を設定します。 |
このセクションでは、本プロバイダーの接続文字列で設定可能なAuthentication プロパティの全リストを提供します。
| プロパティ | 説明 |
| AuthScheme | The type of authentication to use when connecting to remote services. |
| URL | The URL of the GraphQL service. |
| User | 認証するGraphQL ユーザーアカウントのユーザーID を指定します。 |
| Password | 認証するユーザーアカウントのパスワードを指定します。 |
The type of authentication to use when connecting to remote services.
string
"Basic"
The following options are generally available to all connections:
The URL of the GraphQL service.
string
""
The URL of the GraphQL service.
認証するGraphQL ユーザーアカウントのユーザーID を指定します。
string
""
認証サーバーは、ユーザーのID を検証するためにUser とPassword の両方を必要とします。
認証するユーザーアカウントのパスワードを指定します。
string
""
認証サーバーは、ユーザーのID を検証するためにUser とPassword の両方を必要とします。
このセクションでは、本プロバイダーの接続文字列で設定可能なAWS Authentication プロパティの全リストを提供します。
| プロパティ | 説明 |
| AWSCognitoRegion | AWS Cognito のホスティングリージョン。 |
| AWSUserPoolId | ユーザープールのID。 |
| AWSUserPoolClientAppId | ユーザープールのアプリクライアントID。 |
| AWSUserPoolClientAppSecret | ユーザープールのアプリクライアントシークレット。(オプション) |
AWS Cognito のホスティングリージョン。
string
"NORTHERNVIRGINIA"
AWS Cognito のホスティングリージョン。利用可能な値は、OHIO、NORTHERNVIRGINIA、NORTHERNCALIFORNIA、OREGON、CAPETOWN、HONGKONG、HYDERABAD、JAKARTA、MALAYSIA、MELBOURNE、MUMBAI、OSAKA、SEOUL、SINGAPORE、SYDNEY、TOKYO、CENTRAL、CALGARY、BEIJING、NINGXIA、FRANKFURT、IRELAND、LONDON、MILAN、PARIS、SPAIN、STOCKHOLM、ZURICH、TELAVIV、BAHRAIN、UAE、SAOPAULO、GOVCLOUDEAST、GOVCLOUDWEST、ISOLATEDUSEAST、ISOLATEDUSEASTB、ISOLATEDUSWEST、およびISOLATEDEUWEST です。
ユーザープールのID。
string
""
[AWS Cognito]->[Manage User Pools(ユーザープールの管理)]->[select your user pool(ユーザープールを選択)]->[General settings(全般設定)]->[Pool ID(プールのID)]で確認できます。
ユーザープールのアプリクライアントID。
string
""
[AWS Cognito]->[Manage Identity Pools(ID プールの管理)]->[select your user pool(ユーザープールを選択)]->[General settings(全般設定)]->[App clients(アプリクライアント)]->[App client ID(アプリクライアントID)]で確認できます。
ユーザープールのアプリクライアントシークレット。(オプション)
string
""
[AWS Cognito]->[Manage Identity Pools(ID プールの管理)]->[select your user pool(ユーザープールを選択)]->[General settings(全般設定)]->[App clients(アプリクライアント)]->[App client secret(アプリクライアントシークレット)]で確認できます。
このセクションでは、本プロバイダーの接続文字列で設定可能なOAuth プロパティの全リストを提供します。
| プロパティ | 説明 |
| OAuthClientId | カスタムOAuth アプリケーションの作成時に割り当てられたクライアントId を指定します。(コンシューマーキーとも呼ばれます。)このID は、カスタムアプリケーションをOAuth 認可サーバーに登録します。 |
| OAuthClientSecret | カスタムOAuth アプリケーションの作成時に割り当てられたクライアントシークレットを指定します。( コンシューマーシークレット とも呼ばれます。)このシークレットは、カスタムアプリケーションをOAuth 認可サーバーに登録します。 |
| OAuthGrantType | 選択したOAuth フローのグラント種別を指定します。 この値は、OAuth カスタムアプリケーション作成時に設定されたグラント種別と同じである必要があります。 |
| OAuthAuthorizationURL | OAuth サービスの認可URL。 |
| OAuthAccessTokenURL | OAuth アクセストークンを取得するURL。 |
| AuthToken | OAuth アクセストークンをリクエストおよび取得するために使用される認証トークン。 |
| AuthKey | OAuth アクセストークンをリクエストおよび取得するために使用される認証シークレット。 |
カスタムOAuth アプリケーションの作成時に割り当てられたクライアントId を指定します。(コンシューマーキーとも呼ばれます。)このID は、カスタムアプリケーションをOAuth 認可サーバーに登録します。
string
""
OAuthClientId は、ユーザーがOAuth 経由で認証を行う前に設定する必要があるいくつかの接続パラメータの1つです。詳細は接続の確立を参照してください。
カスタムOAuth アプリケーションの作成時に割り当てられたクライアントシークレットを指定します。( コンシューマーシークレット とも呼ばれます。)このシークレットは、カスタムアプリケーションをOAuth 認可サーバーに登録します。
string
""
OAuthClientSecret は、ユーザーがOAuth 経由で認証を行う前に設定する必要があるいくつかの接続パラメータの1つです。詳細は接続の確立を参照してください。
選択したOAuth フローのグラント種別を指定します。 この値は、OAuth カスタムアプリケーション作成時に設定されたグラント種別と同じである必要があります。
string
"CODE"
ほとんどの場合、デフォルトのグラント種別は変更すべきではありません。 最も一般的なOAuth グラント種別とそれぞれのメリット・デメリットについては、https://oauth.net/2/grant-types/ を参照してください。
OAuth サービスの認可URL。
string
""
OAuth サービスの認可URL。このURL でユーザーはサーバーにログインしてアプリケーションにアクセス許可を与えます。OAuth 1.0 では、アクセス許可が付与されるとリクエストトークンが認可されます。
OAuth アクセストークンを取得するURL。
string
""
OAuth アクセストークンを取得するURL。OAuth 1.0 では、このURL で認可されたリクエストトークンがアクセストークンと交換されます。
OAuth アクセストークンをリクエストおよび取得するために使用される認証トークン。
string
""
このプロパティは、OAuth 1.0でヘッドレス認証を実行する場合にのみ必要です。これは、GetOAuthAuthorizationUrl ストアドプロシージャから取得できます。
GetOAuthAccessToken ストアドプロシージャでAuthKey とともに指定して、OAuthAccessToken を取得できます。
OAuth アクセストークンをリクエストおよび取得するために使用される認証シークレット。
string
""
このプロパティは、OAuth 1.0でヘッドレス認証を実行する場合にのみ必要です。これは、GetOAuthAuthorizationUrl ストアドプロシージャから取得できます。
GetOAuthAccessToken ストアドプロシージャでAuthToken とともに指定して、OAuthAccessToken を取得できます。
このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。
| プロパティ | 説明 |
| SSLServerCert | TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。 |
TLS/SSL を使用して接続する際に、サーバーが受け入れ可能な証明書を指定します。
string
""
TLS/SSL 接続を使用する場合は、このプロパティを使用して、サーバーが受け入れるTLS/SSL 証明書を指定できます。コンピュータによって信頼されていない他の証明書はすべて拒否されます。
このプロパティは、次のフォームを取ります:
| 説明 | 例 |
| フルPEM 証明書(例では省略されています) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
| 証明書を保有するローカルファイルへのパス。 | C:\cert.cer |
| 公開鍵(例では省略されています) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
| MD5 Thumbprint (hex 値はスペースおよびコロン区切り) | ecadbdda5a1529c58a1e9e09828d70e4 |
| SHA1 Thumbprint (hex 値はスペースおよびコロン区切り) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
これを指定しない場合は、マシンが信用するすべての証明書が受け入れられます。
すべての証明書の受け入れを示すには、'*'を使用します。セキュリティ上の理由から、これはお勧めできません。
このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。
| プロパティ | 説明 |
| Verbosity | ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。 |
ログファイルのVerbosity レベルを指定し、記録される情報の詳細度を制御します。サポートされる値の範囲は1から5までです。
string
"1"
このプロパティは、Cloud がログファイルに含める詳細レベルを定義します。 Verbosity レベルを高くするとログに記録される情報の詳細が増えますが、ログファイルが大きくなり取り込まれるデータが増えるためパフォーマンスが低下する可能性があります。
デフォルトのVerbosity レベルは1で、通常の運用にはこれが推奨されます。 より高いVerbosity レベルは主にデバッグを目的としています。 各レベルの詳細については、ログ を参照してください。
LogModules プロパティと組み合わせることで、Verbosity は特定の情報カテゴリに対するログの詳細度を調整できます。
このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。
| プロパティ | 説明 |
| BrowsableSchemas | レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
| ExpandArgumentsDepth | This property is used to determine how far the provider should search for columns inside the arguments of type INPUT_OBJECT. |
| ExpandTablesDepth | This property is used to determine the depth of the child tables. |
| ExpandTemporaryTablesDepth | This property is used to determine the depth of the child temporary tables. Only works if ExposeDynamicProcedures is set to true. |
| ExpandColumnsDepth | This property is used to determine how far the provider should search for columns inside the GraphQL objects. |
| IncludeDeprecatedMetadata | This property is used to determine whether the provider should expose deprecated tables and columns or not. |
| ExposeDynamicProcedures | This property is used to determine whether the provider should expose mutations as dynamic procedures or not. |
| ExposeObjectTables | This property is used to determine the extent to which the provider exposes GraphQL object type fields as tables. |
レポートされるスキーマを利用可能なすべてのスキーマのサブセットに制限するオプション設定。例えば、 BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
string
""
利用可能なデータベーススキーマをすべてリストすると余分な時間がかかり、パフォーマンスが低下します。 接続文字列にスキーマのリストを指定することで、時間を節約しパフォーマンスを向上させることができます。
This property is used to determine how far the provider should search for columns inside the arguments of type INPUT_OBJECT.
int
2
This property is used to determine how far the Cloud should search for columns inside the arguments of type INPUT_OBJECT. For example:
{
"variables": {
"input": {
"filters": {
"type": "SUPPLIER"
}
}
},
"query": "query($input:FilteredCompaniesInput!) {\r\nfilteredCompanies(input:$input) {\r\nid:id\r\nvalue:value\r\n}\r\n}\r\n"
}
for the SQL query:
SELECT id,value FROM filteredCompanies WHERE type='SUPPLIER'In this case the nested "FilteredCompaniesInput" is itself of type INPUT_OBJECT. In a column search, the ExpandColumnsDepth property controls how many nested levels of type INPUT_OBJECT are subjected to searching.
This property is used to determine the depth of the child tables.
int
2
This property is used to determine the depth of the child tables.
This property is used to determine the depth of the child temporary tables. Only works if ExposeDynamicProcedures is set to true.
int
5
This property is used to determine the depth of the child temporary tables. Only works if ExposeDynamicProcedures is set to true.
This property is used to determine how far the provider should search for columns inside the GraphQL objects.
int
2
This property is used to determine how far the Cloud should search for columns inside the GraphQL objects.
This property is used to determine whether the provider should expose deprecated tables and columns or not.
bool
false
This property is used to determine whether the Cloud should expose deprecated tables and columns or not.
This property is used to determine whether the provider should expose mutations as dynamic procedures or not.
bool
true
This property is used to determine whether the Cloud should expose mutations as dynamic procedures or not.
This property is used to determine the extent to which the provider exposes GraphQL object type fields as tables.
string
"SHALLOW"
This property is used to determine the extent to which the Cloud exposes GraphQL object type fields as tables. It applies only to fields that meet the following conditions:
このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。
| プロパティ | 説明 |
| CustomHeaders | 他のプロパティ(ContentType やFrom など)から作成されたリクエストヘッダーに追加する、追加HTTP ヘッダーを指定します。このプロパティは、特殊または非標準のAPI 用にリクエストをカスタマイズするために使用します。 |
| MaxRows | 集計やGROUP BY を使用しないクエリで返される最大行数を指定します。 |
| Pagesize | The maximum number of results to return per page from GraphQL. |
| PseudoColumns | テーブルカラムとして公開する擬似カラムを指定します。'TableName=ColumnName;TableName=ColumnName' という形式を使用します。デフォルトは空の文字列で、このプロパティを無効にします。 |
| Timeout | provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。デフォルトは60秒です。タイムアウトを無効にするには0を設定します。 |
他のプロパティ(ContentType やFrom など)から作成されたリクエストヘッダーに追加する、追加HTTP ヘッダーを指定します。このプロパティは、特殊または非標準のAPI 用にリクエストをカスタマイズするために使用します。
string
""
このプロパティを使用して、Cloud から送信されるHTTP リクエストにカスタムヘッダーを追加します。
このプロパティは、追加ヘッダーや非標準ヘッダーを必要とするAPI とやり取りするためにリクエストを微調整する際に役立ちます。 ヘッダーはHTTP 仕様で記述されているとおり"header: value" の形式に従う必要があり、各ヘッダー行はキャリッジリターンとラインフィード(CRLF)文字で区切る必要があります。 重要:このプロパティを設定する際は注意してください。無効なヘッダーを指定するとHTTP リクエストが失敗する場合があります。
集計やGROUP BY を使用しないクエリで返される最大行数を指定します。
int
-1
このプロパティは、集計やGROUP BY 句を含まないクエリに対してCloud が返す行数の上限を設定します。 この制限により、クエリがデフォルトで過度に大きな結果セットを返さないようにします。
クエリにLIMIT 句が含まれている場合、クエリで指定された値がMaxRows 設定よりも優先されます。 MaxRows が"-1" に設定されている場合、LIMIT 句が明示的にクエリに含まれていない限り、行の制限は行われません。
このプロパティは、非常に大きなデータセットを返す可能性のあるクエリを実行する際に、パフォーマンスを最適化し過剰なリソース消費を防ぐのに役立ちます。
The maximum number of results to return per page from GraphQL.
string
""
The Pagesize property affects the maximum number of results to return per page from GraphQL. Setting a higher value may result in better performance at the cost of additional memory eaten up per page consumed. The pageSize is proportional to the GraphQL query cost.
テーブルカラムとして公開する擬似カラムを指定します。'TableName=ColumnName;TableName=ColumnName' という形式を使用します。デフォルトは空の文字列で、このプロパティを無効にします。
string
""
このプロパティを使用すると、Cloud がテーブルカラムとして公開する擬似カラムを定義できます。
個々の擬似カラムを指定するには、以下の形式を使用します。"Table1=Column1;Table1=Column2;Table2=Column3"
すべてのテーブルのすべての擬似カラムを含めるには、次のようにします:"*=*"
provider がタイムアウトエラーを返すまでにサーバーからの応答を待機する最大時間を秒単位で指定します。デフォルトは60秒です。タイムアウトを無効にするには0を設定します。
int
60
このプロパティは、Cloud が操作をキャンセルする前に操作の完了を待機する最大時間を秒単位で制御します。 操作の完了前にタイムアウト時間が経過すると、Cloud は操作をキャンセルして例外をスローします。
タイムアウトは、クエリや操作全体ではなくサーバーとの個々の通信に適用されます。 例えば、各ページング呼び出しがタイムアウト制限内に完了する場合、クエリは60秒を超えて実行を続けることができます。
このプロパティを0に設定するとタイムアウトが無効になり、操作が成功するか、サーバー側のタイムアウト、ネットワークの中断、またはサーバーのリソース制限などの他の条件で失敗するまで無期限に実行されます。 このプロパティは慎重に使用してください。長時間実行される操作がパフォーマンスを低下させたり、応答しなくなる可能性があるためです。