Use below command to get only table data from a PostgreSQL table. It will not dump table create structure.
pg_dump --column-inserts --data-only --table="TableName" DatabaseName > DumpFileName.sql
General Information
Use below command to get only table data from a PostgreSQL table. It will not dump table create structure.
pg_dump --column-inserts --data-only --table="TableName" DatabaseName > DumpFileName.sql
You can use the below query to get number of rows per partition in a MySQL table.
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 'your table name';
GIPSA (General Insurance Public Sector Association) is a group of four public sector insurance companies. These insurance companies are –
It has created a standard pricing for major & frequent medical treatments. It has restricted their cashless claims service to hospitals which follows their standard.
Hospitals associated with it are called GIPSA PPN network hospitals.
Python’s official Documentation says below thing about CSV files,
The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180.
Reading & Writing CSV files is very easy in Python. Below is a code snippet in python which can be used to read q csv file in python.
import csv with open('filename.csv', 'r') as csv_file: reader = csv.reader(csv_file) for row in reader: print(row)
Lets say i have a collection named testsize, using below command will give me
> db.testsize.totalSize()
200
total size in bytes of the data in the collection plus the size of every indexes on the collection.
For more information read official mongodb doc here.
Use below command to install a RPM package on Fedora / CentOS.
rpm -Uhv package_file.rpm
Wow, Python startup time is worse than I thought. Here’s some data from a fast Ubuntu box. I ran all commands a bunch of times to warm caches.
That last one’s a bit of a winner; -S means “don’t load site modules” and comes from this ExpertsExchange discussion. I lose /usr/local/lib; if I manually add that in my script I get my minimal libgit2 program down to 6ms.
There are times when you only want to take partial dump of a mysql table. You can use mysqldump command with one extra option “–where”. You will have to provide your where clause (partial dump condition) in the “–” where option.
Below is the command to take a partial dump of a table.
mysqldump -u [username] -p [databasename] [mytablename] --where " mycolumn = 'somevalue' " > filename.sql
Related Posts:
1. MySQL dump in XML format.
2. MySQL general query logs.
You can follow below steps to install Go 1.8 on Fedora / Ubuntu. (It should work for other Linux distribution as well but it is only tested for Ubuntu / Fedora).
Step 1:
Download the Go 1.8 bundle by clicking here.
Step 2:
Extract the downloaded bundle using below command,
tar -C /usr/local -xzf go1.8.linux-amd64.tar.gz
Step 3:
Add below to your to your path variable, you can add this to either of bash_profile or /etc/profile.
export PATH=$PATH:/usr/local/go/bin
Reload the configuration & GO will be available to use.