![]() ![]() In this example, the CREATE TABLE LIKE statement is used to create the person_2 table that has the same schema and data as the person table in the ApsaraDB for MongoDB database. You need to add the parent nodes they belong to in the MongoDB documents. You can also execute the CREATE TABLE LIKE statement in DLA to achieve this purpose.Ĭopy an existing table in the ApsaraDB for MongoDB database to create a table in DLA. In the Mapping table, the three output columns have been automatically added. ![]() select * from person limit 4 Ĭonventional databases allow you to copy an existing table to create a table. | create_time | timestamp | utf8_general_ci | create external table person like mapping('person') To enable DLA to create a table whose data is automatically mapped to the data of a table in the ApsaraDB for MongoDB database, you can execute one of the following statements:Ĭreate an external table in DLA. To achieve this purpose, you can add the CIDR block 100.104.0.0/16 to a whitelist of the ApsaraDB for MongoDB cluster.Īfter you add the CIDR block 100.104.0.0/16 to the whitelist of the ApsaraDB for MongoDB cluster, you can use a reverse proxy to read data from and write data to the ApsaraDB for MongoDB database. ![]() To enable DLA to access your ApsaraDB for MongoDB cluster, you must use a reverse proxy to access resources in the VPC. If your ApsaraDB for MongoDB cluster resides in a VPC, DLA cannot access resources in the VPC. The ID of the VPC to which the ApsaraDB for MongoDB cluster belongs. The ID of the ApsaraDB for MongoDB cluster. The name of the ApsaraDB for MongoDB database. The connection string uniform resource identifier (URI) of the ApsaraDB for MongoDB cluster. The following table describes the parameters. CREATE DATABASE mongo_test WITH DBPROPERTIES ( The person collection contains the following test data: db.person.insert() Īll data tables in this example use the ApsaraDB for MongoDB schema that is specified in the following statement. This example demonstrates how to create the person collection in the mongo_test database of the ApsaraDB for MongoDB cluster. Write the test data to the ApsaraDB for MongoDB database. Before you create an ApsaraDB for MongoDB schema in DLA, add the classless inter-domain routing (CIDR) block 100.104.0.0/16 to a whitelist of the ApsaraDB for MongoDB cluster.Ĭonnect DLA to the ApsaraDB for MongoDB cluster. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |