Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

com.mongodb.hadoop.hive.BSONSerde.getValue: supporting quoted dots #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

inq
Copy link
Contributor

@inq inq commented Jul 8, 2014

I am using a legacy BSON: using dot characters for some keys.
But this library does not supports this, so I implemented 'quoted dot.'

I tested this feature in my aws ami 3.1.0 & spark 1.0.0 & shark 0.9.0.
My testing query for the shark is:

DROP TABLE test_external;

CREATE EXTERNAL TABLE test_external(
  my_data STRING
)
ROW FORMAT SERDE "com.mongodb.hadoop.hive.BSONSerDe"
WITH SERDEPROPERTIES('mongo.columns.mapping'='{"my_data":"my\\\\.data"}')
STORED AS INPUTFORMAT "com.mongodb.hadoop.mapred.BSONFileInputFormat"
OUTPUTFORMAT "com.mongodb.hadoop.hive.output.HiveBSONFileOutputFormat"
LOCATION '/data'
;

SELECT my_data FROM test_external ORDER BY my_data LIMIT 1;

@llvtt llvtt added the hive label Apr 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants