Class: Google::Apis::DataformV1::Relation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dataform_v1/classes.rb,
lib/google/apis/dataform_v1/representations.rb,
lib/google/apis/dataform_v1/representations.rb

Overview

Represents a database relation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Relation

Returns a new instance of Relation.



3109
3110
3111
# File 'lib/google/apis/dataform_v1/classes.rb', line 3109

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#additional_optionsHash<String,String>

Additional options that will be provided as key/value pairs into the options clause of a create table/view statement. See https://cloud.google.com/bigquery/ docs/reference/standard-sql/data-definition-language for more information on which options are supported. Corresponds to the JSON property additionalOptions

Returns:

  • (Hash<String,String>)


3014
3015
3016
# File 'lib/google/apis/dataform_v1/classes.rb', line 3014

def additional_options
  @additional_options
end

#cluster_expressionsArray<String>

A list of columns or SQL expressions used to cluster the table. Corresponds to the JSON property clusterExpressions

Returns:

  • (Array<String>)


3019
3020
3021
# File 'lib/google/apis/dataform_v1/classes.rb', line 3019

def cluster_expressions
  @cluster_expressions
end

#connectionString

Optional. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection can have the form project`.`location`.`connection_id or projects/project/locations/ location/connections/connection_id`, or be set to DEFAULT. Corresponds to the JSON propertyconnection`

Returns:

  • (String)


3027
3028
3029
# File 'lib/google/apis/dataform_v1/classes.rb', line 3027

def connection
  @connection
end

#dependency_targetsArray<Google::Apis::DataformV1::Target>

A list of actions that this action depends on. Corresponds to the JSON property dependencyTargets



3032
3033
3034
# File 'lib/google/apis/dataform_v1/classes.rb', line 3032

def dependency_targets
  @dependency_targets
end

#disabledBoolean Also known as: disabled?

Whether this action is disabled (i.e. should not be run). Corresponds to the JSON property disabled

Returns:

  • (Boolean)


3037
3038
3039
# File 'lib/google/apis/dataform_v1/classes.rb', line 3037

def disabled
  @disabled
end

#file_formatString

Optional. The file format for the BigQuery table. Corresponds to the JSON property fileFormat

Returns:

  • (String)


3043
3044
3045
# File 'lib/google/apis/dataform_v1/classes.rb', line 3043

def file_format
  @file_format
end

#incremental_table_configGoogle::Apis::DataformV1::IncrementalTableConfig

Contains settings for relations of type INCREMENTAL_TABLE. Corresponds to the JSON property incrementalTableConfig



3048
3049
3050
# File 'lib/google/apis/dataform_v1/classes.rb', line 3048

def incremental_table_config
  @incremental_table_config
end

#partition_expiration_daysFixnum

Sets the partition expiration in days. Corresponds to the JSON property partitionExpirationDays

Returns:

  • (Fixnum)


3053
3054
3055
# File 'lib/google/apis/dataform_v1/classes.rb', line 3053

def partition_expiration_days
  @partition_expiration_days
end

#partition_expressionString

The SQL expression used to partition the relation. Corresponds to the JSON property partitionExpression

Returns:

  • (String)


3058
3059
3060
# File 'lib/google/apis/dataform_v1/classes.rb', line 3058

def partition_expression
  @partition_expression
end

#post_operationsArray<String>

SQL statements to be executed after creating the relation. Corresponds to the JSON property postOperations

Returns:

  • (Array<String>)


3063
3064
3065
# File 'lib/google/apis/dataform_v1/classes.rb', line 3063

def post_operations
  @post_operations
end

#pre_operationsArray<String>

SQL statements to be executed before creating the relation. Corresponds to the JSON property preOperations

Returns:

  • (Array<String>)


3068
3069
3070
# File 'lib/google/apis/dataform_v1/classes.rb', line 3068

def pre_operations
  @pre_operations
end

#relation_descriptorGoogle::Apis::DataformV1::RelationDescriptor

Describes a relation and its columns. Corresponds to the JSON property relationDescriptor



3073
3074
3075
# File 'lib/google/apis/dataform_v1/classes.rb', line 3073

def relation_descriptor
  @relation_descriptor
end

#relation_typeString

The type of this relation. Corresponds to the JSON property relationType

Returns:

  • (String)


3078
3079
3080
# File 'lib/google/apis/dataform_v1/classes.rb', line 3078

def relation_type
  @relation_type
end

#require_partition_filterBoolean Also known as: require_partition_filter?

Specifies whether queries on this table must include a predicate filter that filters on the partitioning column. Corresponds to the JSON property requirePartitionFilter

Returns:

  • (Boolean)


3084
3085
3086
# File 'lib/google/apis/dataform_v1/classes.rb', line 3084

def require_partition_filter
  @require_partition_filter
end

#select_queryString

The SELECT query which returns rows which this relation should contain. Corresponds to the JSON property selectQuery

Returns:

  • (String)


3090
3091
3092
# File 'lib/google/apis/dataform_v1/classes.rb', line 3090

def select_query
  @select_query
end

#storage_uriString

Optional. The fully qualified location prefix of the external folder where table data is stored. The URI should be in the format gs://bucket/ path_to_table/. Corresponds to the JSON property storageUri

Returns:

  • (String)


3097
3098
3099
# File 'lib/google/apis/dataform_v1/classes.rb', line 3097

def storage_uri
  @storage_uri
end

#table_formatString

Optional. The table format for the BigQuery table. Corresponds to the JSON property tableFormat

Returns:

  • (String)


3102
3103
3104
# File 'lib/google/apis/dataform_v1/classes.rb', line 3102

def table_format
  @table_format
end

#tagsArray<String>

Arbitrary, user-defined tags on this action. Corresponds to the JSON property tags

Returns:

  • (Array<String>)


3107
3108
3109
# File 'lib/google/apis/dataform_v1/classes.rb', line 3107

def tags
  @tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
# File 'lib/google/apis/dataform_v1/classes.rb', line 3114

def update!(**args)
  @additional_options = args[:additional_options] if args.key?(:additional_options)
  @cluster_expressions = args[:cluster_expressions] if args.key?(:cluster_expressions)
  @connection = args[:connection] if args.key?(:connection)
  @dependency_targets = args[:dependency_targets] if args.key?(:dependency_targets)
  @disabled = args[:disabled] if args.key?(:disabled)
  @file_format = args[:file_format] if args.key?(:file_format)
  @incremental_table_config = args[:incremental_table_config] if args.key?(:incremental_table_config)
  @partition_expiration_days = args[:partition_expiration_days] if args.key?(:partition_expiration_days)
  @partition_expression = args[:partition_expression] if args.key?(:partition_expression)
  @post_operations = args[:post_operations] if args.key?(:post_operations)
  @pre_operations = args[:pre_operations] if args.key?(:pre_operations)
  @relation_descriptor = args[:relation_descriptor] if args.key?(:relation_descriptor)
  @relation_type = args[:relation_type] if args.key?(:relation_type)
  @require_partition_filter = args[:require_partition_filter] if args.key?(:require_partition_filter)
  @select_query = args[:select_query] if args.key?(:select_query)
  @storage_uri = args[:storage_uri] if args.key?(:storage_uri)
  @table_format = args[:table_format] if args.key?(:table_format)
  @tags = args[:tags] if args.key?(:tags)
end