Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column qualifier for multiple columns in a column family. #340

Open
piyushkhetan opened this issue Sep 19, 2020 · 1 comment
Open

Column qualifier for multiple columns in a column family. #340

piyushkhetan opened this issue Sep 19, 2020 · 1 comment

Comments

@piyushkhetan
Copy link

piyushkhetan commented Sep 19, 2020

I have a hbase table with multiple columns in a single column family let say "c".
In order to save disk space this column family can be written to a single family qualifier and it will make only one row for a given rowkey.
How can I achieve this using this library.
I tried this catalog where I am trying to make "q_data" as my family qualifier.

{
"table":{"namespace":"default", "name":"spark_dense_string", "tableCoder":"PrimitiveType"},
"rowkey":"id:hist_timestamp",
"columns":{
"id":{"cf":"rowkey", "col":"id", "type":"string","length":"36"},
"hist_timestamp":{"cf":"rowkey", "col":"hist_timestamp", "type":"string"},
"q_data":{"cf":"c","col":"value", "type":"double"},
"q_data":{"cf":"c", "col":"est_val", "type":"double"},
"q_data":{"cf":"c","col":"replaced", "type":"smallint"}
}
}

Thanks in advance!

@jonashartwig
Copy link

I think if you change to this (according to documentation) it should work as you like:

{
"table":{"namespace":"default", "name":"spark_dense_string", "tableCoder":"PrimitiveType"},
"rowkey":"hist_timestamp",
"columns":{
"id":{"cf":"rowkey", "col":"hist_timestamp", "type":"string","length":"36"},
"hist_timestamp":{"cf":"rowkey", "col":"hist_timestamp", "type":"string"},
"q_data":{"cf":"c","col":"value", "type":"double"},
"q_data":{"cf":"c", "col":"est_val", "type":"double"},
"q_data":{"cf":"c","col":"replaced", "type":"smallint"}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants