1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetPartitions`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`catalog_id(impl Into<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::catalog_id) / [`set_catalog_id(Option<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_catalog_id):<br>required: **false**<br><p>The ID of the Data Catalog where the partitions in question reside. If none is provided, the Amazon Web Services account ID is used by default.</p><br>
    ///   - [`database_name(impl Into<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::database_name) / [`set_database_name(Option<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_database_name):<br>required: **true**<br><p>The name of the catalog database where the partitions reside.</p><br>
    ///   - [`table_name(impl Into<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::table_name) / [`set_table_name(Option<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_table_name):<br>required: **true**<br><p>The name of the partitions' table.</p><br>
    ///   - [`expression(impl Into<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::expression) / [`set_expression(Option<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_expression):<br>required: **false**<br><p>An expression that filters the partitions to be returned.</p> <p>The expression uses SQL syntax similar to the SQL <code>WHERE</code> filter clause. The SQL statement parser <a href="http://jsqlparser.sourceforge.net/home.php">JSQLParser</a> parses the expression.</p> <p><i>Operators</i>: The following are the operators that you can use in the <code>Expression</code> API call:</p> <dl>  <dt>   =  </dt>  <dd>   <p>Checks whether the values of the two operands are equal; if yes, then the condition becomes true.</p>   <p>Example: Assume 'variable a' holds 10 and 'variable b' holds 20.</p>   <p>(a = b) is not true.</p>  </dd>  <dt>   &lt; &gt;  </dt>  <dd>   <p>Checks whether the values of two operands are equal; if the values are not equal, then the condition becomes true.</p>   <p>Example: (a &lt; &gt; b) is true.</p>  </dd>  <dt>   &gt;  </dt>  <dd>   <p>Checks whether the value of the left operand is greater than the value of the right operand; if yes, then the condition becomes true.</p>   <p>Example: (a &gt; b) is not true.</p>  </dd>  <dt>   &lt;  </dt>  <dd>   <p>Checks whether the value of the left operand is less than the value of the right operand; if yes, then the condition becomes true.</p>   <p>Example: (a &lt; b) is true.</p>  </dd>  <dt>   &gt;=  </dt>  <dd>   <p>Checks whether the value of the left operand is greater than or equal to the value of the right operand; if yes, then the condition becomes true.</p>   <p>Example: (a &gt;= b) is not true.</p>  </dd>  <dt>   &lt;=  </dt>  <dd>   <p>Checks whether the value of the left operand is less than or equal to the value of the right operand; if yes, then the condition becomes true.</p>   <p>Example: (a &lt;= b) is true.</p>  </dd>  <dt>   AND, OR, IN, BETWEEN, LIKE, NOT, IS NULL  </dt>  <dd>   <p>Logical operators.</p>  </dd> </dl> <p><i>Supported Partition Key Types</i>: The following are the supported partition keys.</p> <ul>  <li>   <p><code>string</code></p></li>  <li>   <p><code>date</code></p></li>  <li>   <p><code>timestamp</code></p></li>  <li>   <p><code>int</code></p></li>  <li>   <p><code>bigint</code></p></li>  <li>   <p><code>long</code></p></li>  <li>   <p><code>tinyint</code></p></li>  <li>   <p><code>smallint</code></p></li>  <li>   <p><code>decimal</code></p></li> </ul> <p>If an type is encountered that is not valid, an exception is thrown.</p> <p>The following list shows the valid operators on each type. When you define a crawler, the <code>partitionKey</code> type is created as a <code>STRING</code>, to be compatible with the catalog partitions.</p> <p><i>Sample API Call</i>:</p><br>
    ///   - [`next_token(impl Into<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_next_token):<br>required: **false**<br><p>A continuation token, if this is not the first call to retrieve these partitions.</p><br>
    ///   - [`segment(Segment)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::segment) / [`set_segment(Option<Segment>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_segment):<br>required: **false**<br><p>The segment of the table's partitions to scan in this request.</p><br>
    ///   - [`max_results(i32)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of partitions to return in a single response.</p><br>
    ///   - [`exclude_column_schema(bool)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::exclude_column_schema) / [`set_exclude_column_schema(Option<bool>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_exclude_column_schema):<br>required: **false**<br><p>When true, specifies not returning the partition column schema. Useful when you are interested only in other partition attributes such as partition values or location. This approach avoids the problem of a large response by not returning duplicate data.</p><br>
    ///   - [`transaction_id(impl Into<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::transaction_id) / [`set_transaction_id(Option<String>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_transaction_id):<br>required: **false**<br><p>The transaction ID at which to read the partition contents.</p><br>
    ///   - [`query_as_of_time(DateTime)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::query_as_of_time) / [`set_query_as_of_time(Option<DateTime>)`](crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::set_query_as_of_time):<br>required: **false**<br><p>The time as of when to read the partition contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with <code>TransactionId</code>.</p><br>
    /// - On success, responds with [`GetPartitionsOutput`](crate::operation::get_partitions::GetPartitionsOutput) with field(s):
    ///   - [`partitions(Option<Vec::<Partition>>)`](crate::operation::get_partitions::GetPartitionsOutput::partitions): <p>A list of requested partitions.</p>
    ///   - [`next_token(Option<String>)`](crate::operation::get_partitions::GetPartitionsOutput::next_token): <p>A continuation token, if the returned list of partitions does not include the last one.</p>
    /// - On failure, responds with [`SdkError<GetPartitionsError>`](crate::operation::get_partitions::GetPartitionsError)
    pub fn get_partitions(&self) -> crate::operation::get_partitions::builders::GetPartitionsFluentBuilder {
        crate::operation::get_partitions::builders::GetPartitionsFluentBuilder::new(self.handle.clone())
    }
}