1 # Description: 2 # BigQueryReader implementation 3 4 package( 5 default_visibility = ["//visibility:private"], 6 ) 7 8 licenses(["notice"]) # Apache 2.0 9 10 load( 11 "//tensorflow:tensorflow.bzl", 12 "tf_cc_test", 13 "tf_copts", 14 "tf_kernel_library", 15 ) 16 17 # For platform specific build config 18 load( 19 "//tensorflow/core:platform/default/build_config.bzl", 20 "tf_proto_library", 21 ) 22 23 filegroup( 24 name = "all_files", 25 srcs = glob( 26 include = [ 27 "**/*", 28 ], 29 exclude = [ 30 "**/METADATA", 31 "**/OWNERS", 32 ], 33 ), 34 visibility = ["//tensorflow:__subpackages__"], 35 ) 36 37 tf_kernel_library( 38 name = "bigquery_reader_ops", 39 srcs = ["bigquery_reader_ops.cc"], 40 visibility = ["//visibility:public"], 41 deps = [ 42 ":bigquery_table_accessor", 43 ":bigquery_table_partition_proto_cc", 44 "//tensorflow/contrib/cloud:bigquery_reader_ops_op_lib", 45 "//tensorflow/core:framework", 46 "//tensorflow/core:lib", 47 "//tensorflow/core:reader_base", 48 ], 49 ) 50 51 cc_library( 52 name = "bigquery_table_accessor", 53 srcs = ["bigquery_table_accessor.cc"], 54 hdrs = ["bigquery_table_accessor.h"], 55 copts = tf_copts(), 56 linkstatic = 1, 57 deps = [ 58 ":bigquery_table_partition_proto_cc", 59 "//tensorflow/core:lib", 60 "//tensorflow/core:protos_all_cc", 61 "//tensorflow/core/platform/cloud:curl_http_request", 62 "//tensorflow/core/platform/cloud:google_auth_provider", 63 ], 64 alwayslink = 1, 65 ) 66 67 tf_cc_test( 68 name = "bigquery_table_accessor_test", 69 size = "small", 70 srcs = [ 71 "bigquery_table_accessor_test.cc", 72 "bigquery_table_accessor_test_data.h", 73 ], 74 deps = [ 75 ":bigquery_table_accessor", 76 "//tensorflow/core:lib_internal", 77 "//tensorflow/core:protos_all_cc", 78 "//tensorflow/core:test", 79 "//tensorflow/core:test_main", 80 "//tensorflow/core/platform/cloud:http_request_fake", 81 ], 82 ) 83 84 tf_proto_library( 85 name = "bigquery_table_partition_proto", 86 srcs = ["bigquery_table_partition.proto"], 87 cc_api_version = 2, 88 ) 89