

# SubStatementData
<a name="API_SubStatementData"></a>

Information about an SQL statement.

## Contents
<a name="API_SubStatementData_Contents"></a>

**Note**  
In the following list, the required parameters are described first.

 ** Id **   <a name="redshiftdata-Type-SubStatementData-Id"></a>
The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a suffix of `:2` that indicates the second SQL statement of a batch query.  
Type: String  
Pattern: `[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}(:\d+)?`   
Required: Yes

 ** CreatedAt **   <a name="redshiftdata-Type-SubStatementData-CreatedAt"></a>
The date and time (UTC) the statement was created.   
Type: Timestamp  
Required: No

 ** Duration **   <a name="redshiftdata-Type-SubStatementData-Duration"></a>
The amount of time in nanoseconds that the statement ran.  
Type: Long  
Required: No

 ** Error **   <a name="redshiftdata-Type-SubStatementData-Error"></a>
The error message from the cluster if the SQL statement encountered an error while running.  
Type: String  
Required: No

 ** HasResultSet **   <a name="redshiftdata-Type-SubStatementData-HasResultSet"></a>
A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.  
Type: Boolean  
Required: No

 ** QueryString **   <a name="redshiftdata-Type-SubStatementData-QueryString"></a>
The SQL statement text.  
Type: String  
Required: No

 ** RedshiftQueryId **   <a name="redshiftdata-Type-SubStatementData-RedshiftQueryId"></a>
The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.   
Type: Long  
Required: No

 ** ResultRows **   <a name="redshiftdata-Type-SubStatementData-ResultRows"></a>
Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A `-1` indicates the value is null.  
Type: Long  
Required: No

 ** ResultSize **   <a name="redshiftdata-Type-SubStatementData-ResultSize"></a>
The size in bytes of the returned results. A `-1` indicates the value is null.  
Type: Long  
Required: No

 ** Status **   <a name="redshiftdata-Type-SubStatementData-Status"></a>
The status of the SQL statement. An example is the that the SQL statement finished.   
Type: String  
Valid Values: `SUBMITTED | PICKED | STARTED | FINISHED | ABORTED | FAILED`   
Required: No

 ** UpdatedAt **   <a name="redshiftdata-Type-SubStatementData-UpdatedAt"></a>
The date and time (UTC) that the statement metadata was last updated.  
Type: Timestamp  
Required: No

## See Also
<a name="API_SubStatementData_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/redshift-data-2019-12-20/SubStatementData) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/redshift-data-2019-12-20/SubStatementData) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/redshift-data-2019-12-20/SubStatementData) 