In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about why the ontology defined in ksql does not exist in dataModel. I think it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
problem
Everything was fine the other day. Yesterday, several tables in MySQL were changed because the demand side put forward new requirements. The main way to modify it is to cut a few columns or delete them while retaining the original data, which can be easily done with the help of visual MySQL tools. However, there is an error "report execution error: report data acquisition failed" when today's report instance is running.
Following the idea of post-debugging, first open the previous .w report file and find that the data source of the chart component is abnormal, as shown in the figure:
So, check back and trace the Action definition under the logic on the BIZ side. I used the KSQL type Action created by simple ksql. Next, you want to analyze the corresponding SQL statement in detail, but the warning error shown in the title appears when you click on the... symbol in the ksql line in the ksql editor. Please refer to the following figure:
Solution
The meaning couldn't be clearer. Take a look at the ontology definition. So, go to the antology sub-module to observe. At first glance, there is no problem-there is a real problem. First go to the wex5 forum to search for relevant help, only found one, said that the KSQL editor normal error prompt, there is no other progress and solutions.
According to the previous operation, it must be the problem when the ontology is generated in reverse after adjusting the structure of the data table. So, generate the ontology in reverse again carefully again, and generate the corresponding database table normally.
So, it's time to create an ACTION of type ksql. That's the problem. Previously, I created a new concept directly in eclipse, filled in the relationship, and then entered the data in the runtime interface. Now, I am directly through the data table structure modified later in MYSQL, and then reverse generate the ontology. In this step, you should pay special attention to the case of the standard action operation. Because essentially these ACTION correspond to some JAVA functions in the background, while JAVA is naturally case-sensitive.
The next step is to examine the problem with the ksql expression. Fortunately, the previous ksql still exists. I wrote it down as follows:
Select Mo_TradeDetail.fTradeNatureClass as fTradeNatureClass,Mo_TradeDetail.fTradeNature as fTradeNature,count (Mo_TradeDetail.fTradeNature) as fTradeNatureCount,sum (Mo_TradeDetail.fTotal) as fTotalCount,sum (Mo_TradeDetail.fFine) as fFineCount from Mo_TradeDetailMo_tradedetail group by Mo_TradeDetail.fTradeNature
Now, click the [Test] button and there is an error in the run! However, there is no more detailed error prompt (not as easy to locate as in the mysql visual management tool)!
After wasting a lot of time, I noticed that the case of the concept was inconsistent with the case of the concept after I reverse-generated the ontology (the correct form is Mo_tradedetail). So I tried to change the case as follows:
Select Mo_tradedetail.fTradeNatureClass as fTradeNatureClass,Mo_tradedetail.fTradeNature as fTradeNature,count (Mo_tradedetail.fTradeNature) as fTradeNatureCount,sum (Mo_tradedetail.fTotal) as fTotalCount,sum (Mo_tradedetail.fFine) as fFineCount from Mo_tradedetail Mo_tradedetail group by Mo_tradedetail.fTradeNature
Now click the [Test] button, and it runs successfully! Next, it is easy to adjust the form of the chart data source in the report form.
A summary after suffering losses
The root cause is that the KSQL syntax provided in WeX5 is not familiar, as described below: in this KSQL statement, the table (that is, the concept) name is case-sensitive, while the latter, such as the sum function, is not sensitive at all! I can't believe I wasted so much time because of a little grammar problem.
This is why the ontology defined in ksql does not exist in dataModel. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.