Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

GoldData fuses the collected data into two relational tables

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Overview

In the last issue, we grabbed the news data, and now we're going to merge it into two database tables, news_site and news, through GoldData. As shown in the following figure:

It is easy to see that there is a correlation between the two tables, so how to write the data to the association, which we will cover one by one in the previous issue.

Define fusion mapping dataset news = > table news_site

In Fusion Management, select the dataset news, select the database table news_site, click the add button, and then click Edit Mapping. As shown in the following figure:

Select "Associated Field" for the associated data method, "name" for the associated table field, "dataset.source" for the associated dataset JS, and then select "Save".

The news_site table has two fields: one is the id field, which is not associated because it is a self-growing field, and the other is the name field, which is selected as "dataset field" and the content is from the source field of the dataset news.

Manual work

Let's go back to the "Fusion Management" page, click "Fusion Job", and then click "Manual Job" to open the "Manual Job" subpage, as shown in the following figure:

We can see here that there is no problem with integration. Click "submit and next" and the merge result will be written to the database table. As shown in the following figure:

Then go back to the "Fusion Job" subpage, click "start Fusion", and the automatic fusion will begin. As shown in the following figure:

The system will merge the data of the dataset one by one according to the specified rules.

Dataset news = > Table news

In Fusion Management, select the dataset news, select the database table news, click the add button, and then click Edit Mapping. As shown in the following figure:

Select "not associated, data appended" in the associated data method, which means that the new data in the dataset will be appended to the new record of table news, but of course the old data will not be appended to the new record of news, that is, repeated fusion will not produce duplicate data in table news.

For field mapping, the description is as follows:

Field description id self-growing, without mapping title directly mapping to dataset field titlepub_date using JS to add: 00 to the dataset field pubdate content to site_id mapping table news_site, through the dataset field source search to get the idcontent directly mapped to the dataset field contentdate_created to create the value using JS to manually work

Let's go back to the "Fusion Management" page, click "Fusion Job", and then click "Manual Job" to open the "Manual Job" subpage, as shown in the following figure:

Confirm that it is correct, click "submit and next" and the data will be written to the database. As shown in the following figure:

Then go back to the "Fusion Job" subpage, click "start Fusion", and the automatic fusion will begin.

Conclusion

With GoldData, we can easily merge the data and the relationships between them into relational database tables. Next, we also introduce the fusion of self-associated data.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report