# I am getting CDC data from Transaction tables from MYSQL DB to Elastic search , How Can I see latest status of transactions?

**URL:** <https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902>\
**Category:** Kibana\
**Tags:** transforms\
**Created:** [June 1, 2023, 6:13am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902 "2023-06-01T06:13:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitinkapoor](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nitinkapoor](https://discuss.elastic.co/u/nitinkapoor)\
**Post date:** [June 1, 2023, 6:13am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902/1 "2023-06-01T06:13:52Z")

</div>

I am getting CDC data from Transaction tables from MYSQL DB to Elastic search , How Can I see latest status of transactions ?  
Should I use Transforms ?

---

<div class="post-metadata">

**Author:** ![przemekwitek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/przemekwitek/32/79526_2.png) [@przemekwitek](https://discuss.elastic.co/u/przemekwitek)\
**Post date:** [June 1, 2023, 7:35am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902/2 "2023-06-01T07:35:39Z")

</div>

Hi,  
Yes, indeed, it seems that `latest` transform is what you are looking for.  
Check out the [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-overview.html#latest-transform-overview) and also [this blog post](https://www.elastic.co/blog/how-to-use-transforms-to-track-your-most-recent-customer-orders).

With these resources you should be able to quickly start your journey and develop a working solution.

---

<div class="post-metadata">

**Author:** ![nitinkapoor](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nitinkapoor](https://discuss.elastic.co/u/nitinkapoor)\
**Post date:** [June 3, 2023, 12:49am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902/3 "2023-06-03T00:49:34Z")

</div>

Thanks for the response @przemekwitek  
I am able to create an index with latest record using transform , but when I try to view the query I am getting following error "Can't get text on a VALUE\_NULL at 1:209"  
Can you please suggest any pointers to debug this issue

---

<div class="post-metadata">

**Author:** ![przemekwitek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/przemekwitek/32/79526_2.png) [@przemekwitek](https://discuss.elastic.co/u/przemekwitek)\
**Post date:** [June 5, 2023, 7:48am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902/4 "2023-06-05T07:48:25Z")

</div>

> [@nitinkapoor](#):
>
> I am able to create an index with latest record using transform

Does it mean you've created and run the transform? If so, could you provide the transform config?

> [@](#):
>
> but when I try to view the query I am getting following error "Can't get text on a VALUE\_NULL at 1:209"

What do you mean by "view the query"? Do you issue query against the destination index created by the transform?

> [@](#):
>
> Can you please suggest any pointers to debug this issue

In general, if transform doesn't work properly it makes sense to try out the [`_preview` API](https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html).  
This should tell you whether the transform's configuration is ok.  
You can also bypass transform and query the source index using regular `_search` API. Maybe there is some problem in the source data that is not relevant to transforms? Then you should be able to discover it while experimenting with `_search` queries.

---

<div class="post-metadata">

**Author:** ![nitinkapoor](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nitinkapoor](https://discuss.elastic.co/u/nitinkapoor)\
**Post date:** [June 5, 2023, 8:01am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902/5 "2023-06-05T08:01:20Z")

</div>

Thanks for your response @przemekwitek  
I am able to see the data during preview the issue was coming only when actual transform was created, does it mean that I have to pre create the index and define nullable value for each nullable attribute in the index before creating the transform

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 3, 2023, 8:01am UTC](https://discuss.elastic.co/t/i-am-getting-cdc-data-from-transaction-tables-from-mysql-db-to-elastic-search-how-can-i-see-latest-status-of-transactions/334902/6 "2023-07-03T08:01:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
