Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9343108
orc-print-contents
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
662 B
Subscribers
None
orc-print-contents
View Options
#!/usr/bin/env python3
# Copyright (C) 2021 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
"""Print the contents of an ORC file."""
import
argparse
import
pyorc
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
)
parser
.
add_argument
(
"files"
,
type
=
argparse
.
FileType
(
mode
=
"rb"
),
nargs
=
"+"
)
args
=
parser
.
parse_args
()
for
orc_file
in
args
.
files
:
reader
=
pyorc
.
Reader
(
orc_file
)
for
row
in
reader
:
print
(
row
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Jul 4, 1:16 PM (1 w, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3292211
Attached To
rDDATASET Datasets
Event Timeline
Log In to Comment