File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ def create_bigquery_client project_id :
16+ # [START create_bigquery_client]
17+ require "google/cloud"
18+
19+ gcloud = Google ::Cloud . new project_id
20+ bigquery = gcloud . bigquery
21+ # [END create_bigquery_client]
22+ end
23+
1524def create_dataset project_id :, dataset_id :
1625 # [START create_dataset]
1726 # project_id = "Your Google Cloud project ID"
Original file line number Diff line number Diff line change @@ -88,6 +88,12 @@ def capture &block
8888 end
8989 attr_reader :captured_output
9090
91+ example "create BigQuery client" do
92+ client = create_bigquery_client project_id : @project_id
93+
94+ expect ( client ) . to be_a Google ::Cloud ::Bigquery ::Project
95+ end
96+
9197 describe "Managing Datasets" do
9298 example "create dataset" do
9399 delete_test_dataset!
You can’t perform that action at this time.
0 commit comments