Github user ictmalili commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/883#discussion_r80218089
--- Diff: tools/doc/hawqregister_help ---
@@ -110,14 +113,24 @@ table 'pg_aoseg.pg_paqseg_77160'.
*****************************************************
EXAMPLE FOR USAGE2
*****************************************************
-$ psql -c "drop table if exists table;"
-$ psql -c "create table table(i int) with (appendonly=true,
orientation=parquet) distributed by (i);"
-$ psql -c "insert into table values(1), (2), (3);"
-$ hawq extract -d postgres -o t.yml table
-$ hawq register -d postgres -c t.yml newtable
-In this example, suppose that "table" is a table in old HAWQ Cluster, user
dump "t.yml" yaml file to
-save the metadata of "table". To register the "newtable" in a new HAWQ
Cluster, user run "hawq register"
-to register the newtable with the given yaml file "t.yml".
+This example shows hawq register functionality of hawq register according
to yml configuration file.
+Usually the yml configuration file is generated by hawq extract.
+This example shows the life cycle of hawq extract and hawq register.
+
+Firstly, create a table and insert some data into it:
+$ psql -c "create table paq1(a int, b varchar(10))with(appendonly=true,
orientation=parquet);"
+$ psql -c "insert into paq1 values(generate_series(1,1000), 'abcde');"
+
+Secondly, extract the table metadata information out:
+$ hawq extract -o paq1.yml paq1
+
+Thirdly, register to new table paq2 identifying yml file:
+$ hawq register --config paq1.yml paq2
+
+Finally, select the new table to look at whether the content has already
been registered.
+$ select count(*) from paq2;
+
+In the above example, the final result must be return 1000.
--- End diff --
change "must be" to "should"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---