Elasticsearch init ops and kernel#1098
Conversation
|
@yongtang the build on windows fails due to : elasticsearch_ops.lo.lib(elasticsearch_kernels.obj) : error LNK2019: unresolved external symbol "public: __cdecl
tensorflow::CurlHttpRequest::CurlHttpRequest(void)" (??0CurlHttpRequest@tensorflow@@QEAA@XZ) referenced in
function "public: virtual class tensorflow::HttpRequest * __cdecl tensorflow::CurlHttpRequest::Factory::Create(void)" (?
Create@Factory@CurlHttpRequest@tensorflow@@UEAAPEAVHttpRequest@3@XZ)
2020-08-21T11:53:47.8604213Z bazel-out\x64_windows-fastbuild\bin\tensorflow_io\core\python\ops\libtensorflow_io.so : fatal error LNK1120: 1 unresolved externals
2020-08-21T11:53:47.9588587Z Target //tensorflow_io/core:python/ops/libtensorflow_io.so failed to buildIt is unable to resolve cc_library(
name = "core_ops",
srcs = [
"kernels/archive_kernels.cc",
"kernels/http_kernels.cc",
"ops/core_ops.cc",
],
copts = tf_io_copts(),
linkstatic = True,
deps = [
":dataset_ops",
"@curl",
"@libarchive",
],
alwayslink = 1,
) |
|
@kvignesh1420 that was a known issue and has not been resolved yet. As you might see, core_ops is not enabled for windows build: You can just move |
|
cc: @yongtang for review. |
|
@kvignesh1420 Thanks for the PR! Would you mind to add a test in a follow up PR? |
|
@yongtang sure. |
|
@yongtang can we return a tensor of tensors from the kernel to the OP? For ex: The records I get from the api response are a list of jsons. In this scenario, I want to prepare a tensor for the column/field names and a tensor<tensor> where each inner tensor will contain the values for a column/field. The issue is, how do I return this tensor<tensor> to python from cpp kernels. Is there an alternative approach for these scenarios? |
|
@kvignesh1420 I would assume an easy way is to obtain the json string from dataset implementation, then using Let me know if you run into any issues. |
* elasticsearch init ops, kernel and python api * lint fixes * added curl dependency * BUILD lint fixes * skipping window's build for elasticsearch ops
* elasticsearch init ops, kernel and python api * lint fixes * added curl dependency * BUILD lint fixes * skipping window's build for elasticsearch ops
This PR addresses the issue #1093 by adding implementations for the following:
IO>ElasticsearchReadableInitOp.ElasticsearchReadableInitOpKernel.tfio.experimental.elasticsearch.ElasticsearchIODatasettemplate implementation and few helper methods.Also, modified the
BUILDfile for Bazel build ofelasticsearch_ops.