Reference documentation and code samples for the Analytics Hub V1 API class Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.
A subscription represents a subscribers' access to a particular set of
published data. It contains references to associated listings,
data exchanges, and linked datasets.
(::String) — Output only. Resource name of the source Data Exchange.
e.g. projects/123/locations/us/dataExchanges/456
Note: The following fields are mutually exclusive: data_exchange, listing. If a field in that set is populated, all other fields in the set will automatically be cleared.
(::String) — Output only. Resource name of the source Listing.
e.g. projects/123/locations/us/dataExchanges/456/listings/789
Note: The following fields are mutually exclusive: listing, data_exchange. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Analytics Hub V1 API - Class Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription (v0.13.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.13.1 (latest)](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/latest/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.13.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.13.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.12.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.12.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.11.1](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.11.1/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.10.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.10.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.9.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.9.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.8.1](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.8.1/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.7.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.7.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.6.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.6.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.5.2](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.5.2/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.4.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.4.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.3.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.3.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.2.1](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.2.1/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription)\n- [0.1.0](/ruby/docs/reference/google-cloud-bigquery-analytics_hub-v1/0.1.0/Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription) \nReference documentation and code samples for the Analytics Hub V1 API class Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription.\n\nA subscription represents a subscribers' access to a particular set of\npublished data. It contains references to associated listings,\ndata exchanges, and linked datasets. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #commercial_info\n\n def commercial_info() -\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo\n\n**Returns**\n\n- ([::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::CommercialInfo](./Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription-CommercialInfo)) --- Output only. This is set if this is a commercial subscription i.e. if this subscription was created from subscribing to a commercial listing.\n\n### #creation_time\n\n def creation_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. Timestamp when the subscription was created.\n\n### #data_exchange\n\n def data_exchange() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Resource name of the source Data Exchange. e.g. projects/123/locations/us/dataExchanges/456\n\n Note: The following fields are mutually exclusive: `data_exchange`, `listing`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #destination_dataset\n\n def destination_dataset() -\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset\n\n**Returns**\n\n- ([::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset](./Google-Cloud-Bigquery-AnalyticsHub-V1-DestinationDataset)) --- Optional. BigQuery destination dataset to create for the subscriber.\n\n### #destination_dataset=\n\n def destination_dataset=(value) -\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset](./Google-Cloud-Bigquery-AnalyticsHub-V1-DestinationDataset)) --- Optional. BigQuery destination dataset to create for the subscriber. \n**Returns**\n\n- ([::Google::Cloud::Bigquery::AnalyticsHub::V1::DestinationDataset](./Google-Cloud-Bigquery-AnalyticsHub-V1-DestinationDataset)) --- Optional. BigQuery destination dataset to create for the subscriber.\n\n### #last_modify_time\n\n def last_modify_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. Timestamp when the subscription was last modified.\n\n### #linked_dataset_map\n\n def linked_dataset_map() -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource}) --- Output only. Map of listing resource names to associated linked resource, e.g. projects/123/locations/us/dataExchanges/456/listings/789 -\\\u003e projects/123/datasets/my_dataset\n\n For listing-level subscriptions, this is a map of size 1.\n Only contains values if state == STATE_ACTIVE.\n\n### #linked_resources\n\n def linked_resources() -\u003e ::Array\u003c::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::LinkedResource](./Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription-LinkedResource)\\\u003e) --- Output only. Linked resources created in the subscription. Only contains values if state = STATE_ACTIVE.\n\n### #listing\n\n def listing() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Resource name of the source Listing. e.g. projects/123/locations/us/dataExchanges/456/listings/789\n\n Note: The following fields are mutually exclusive: `listing`, `data_exchange`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #log_linked_dataset_query_user_email\n\n def log_linked_dataset_query_user_email() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Output only. By default, false. If true, the Subscriber agreed to the email sharing mandate that is enabled for DataExchange/Listing.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The resource name of the subscription. e.g. `projects/myproject/locations/us/subscriptions/123`.\n\n### #organization_display_name\n\n def organization_display_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Display name of the project of this subscription.\n\n### #organization_id\n\n def organization_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Organization of the project this subscription belongs to.\n\n### #resource_type\n\n def resource_type() -\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType\n\n**Returns**\n\n- ([::Google::Cloud::Bigquery::AnalyticsHub::V1::SharedResourceType](./Google-Cloud-Bigquery-AnalyticsHub-V1-SharedResourceType)) --- Output only. Listing shared asset type.\n\n### #state\n\n def state() -\u003e ::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::State\n\n**Returns**\n\n- ([::Google::Cloud::Bigquery::AnalyticsHub::V1::Subscription::State](./Google-Cloud-Bigquery-AnalyticsHub-V1-Subscription-State)) --- Output only. Current state of the subscription.\n\n### #subscriber_contact\n\n def subscriber_contact() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Email of the subscriber."]]