[
https://issues.apache.org/jira/browse/FLINK-33971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-33971:
-----------------------------------
Labels: pull-request-available (was: )
> Specifies whether to use HBase table that supports dynamic columns.
> -------------------------------------------------------------------
>
> Key: FLINK-33971
> URL: https://issues.apache.org/jira/browse/FLINK-33971
> Project: Flink
> Issue Type: New Feature
> Components: Connectors / HBase
> Reporter: MOBIN
> Priority: Minor
> Labels: pull-request-available
>
> Specifies whether to use HBase table that supports dynamic columns.
> Refer to the dynamic.table parameter in this document:
> [[https://www.alibabacloud.com/help/en/flink/developer-reference/apsaradb-for-hbase-connector#section-ltp-3fy-9qv|http://example.com]]
> Sample code for a result table that supports dynamic columns
> {code:java}
> CREATE TEMPORARY TABLE datagen_source (
> id INT,
> f1hour STRING,
> f1deal BIGINT,
> f2day STRING,
> f2deal BIGINT
> ) WITH (
> 'connector'='datagen'
> );
> CREATE TEMPORARY TABLE hbase_sink (
> rowkey INT,
> f1 ROW<`hour` STRING, deal BIGINT>,
> f2 ROW<`day` STRING, deal BIGINT>
> ) WITH (
> 'connector'='hbase-2.2',
> 'table-name'='<yourTableName>',
> 'zookeeper.quorum'='<yourZookeeperQuorum>',
> 'dynamic.table'='true'
> );
> INSERT INTO hbase_sink
> SELECT id, ROW(f1hour, f1deal), ROW(f2day, f2deal) FROM datagen_source; {code}
> If dynamic.table is set to true, HBase table that supports dynamic columns is
> used.
> Two fields must be declared in the rows that correspond to each column
> family. The value of the first field indicates the dynamic column, and the
> value of the second field indicates the value of the dynamic column.
> For example, the datagen_source table contains a row of data The row of data
> indicates that the ID of the commodity is 1, the transaction amount of the
> commodity between 10:00 and 11:00 is 100, and the transaction amount of the
> commodity on July 26, 2020 is 10000. In this case, a row whose rowkey is 1 is
> inserted into the HBase table. f1:10 is 100, and f2:2020-7-26 is 10000.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)