DPdash importer
Project description
DPimport: A command line glob importer for DPdash
DPimport is a command line tool for importing files into DPdash using a
simple glob
expression.
Table of contents
Installation
Just use pip
pip install https://github.com/AMP-SCZ/dpimport.git
Configuration
DPimport requires a configuration file in YAML format, passed as a command
line argument with -c|--config
, for establishing a MongoDB database
connection. You will find an example configuration file in the examples
directory within this repository.
Usage
The main command line tool is import.py
. You can use this tool to import any
DPdash-compatible CSV files or metadata files using the direct path to a file
or a glob expression (use single quotes to avoid shell expansion)
import.py -c config.yml '/PHOENIX/GENERAL/STUDY_A/SUB_001/DATA_TYPE/processed/*.csv'
You may also now use the **
recursive glob expression, for example:
import.py -c config.yml '/PHOENIX/**/*.csv'
or
import.py -c config.yml '/PHOENIX/GENERAL/**/processed/*.csv'
and so on.
Details about the pattern /**/
directory/*/*.csv
matches only directory/[subdirectory]/[filename].csv
. With a recursive glob pattern, directory/**/*.csv
will additionally match:
directory/[filename].csv
(no subdirectory)directory/[subdirectory1]/[subdirectory2]/[filename].csv
(sub-subdirectory)
and so on, for as many levels deep as exist in the directory tree.
MongoDB
This tool requires MongoDB to be running and accessible with the credentials you
supply in the config.yml
file. For tips on MongoDB as it is used in DPdash and DPimport,
see the DPdash wiki.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dpimport_test_2-1.0.6.tar.gz
.
File metadata
- Download URL: dpimport_test_2-1.0.6.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72c28ac2fc5472a5d4359bbdc636770300ce28f6ac6520dc05da0a01550aefaf |
|
MD5 | 7bf23ce0072db282c8906ede5a256df8 |
|
BLAKE2b-256 | 60cc5bb68648f52e62c42b56d6b51b7817db5b610264ee842c3fc02569742c23 |
File details
Details for the file dpimport_test_2-1.0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: dpimport_test_2-1.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99447aa9c19a2fbe5bf551a29cfe7db32234a13646f81bedba3d8ad081d0d12a |
|
MD5 | 8b521a3391143214afced55b78742601 |
|
BLAKE2b-256 | 69e5c7493be481ac1d98600cd9d289bb99954d0b427dbc54a9e57cb01d6948f2 |