postgresql

Airflow的MySqlOperator和PostgresOperator

北城余情 提交于 2020-11-29 11:16:17
1. 依赖 MySqlOperator 的数据库交互通过 MySQLdb 模块来实现, 使用前需要安装相关依赖: pip install apache-airflow[mysql] 2. 使用 使用 MySqlOperator 执行sql任务的一个简单例子: from airflow import DAG from airflow.utils.dates import days_ago from airflow.operators.mysql_operator import MySqlOperator default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': days_ago(1), 'email': ['j_hao104@163.com'], 'email_on_failure': True, 'email_on_retry': False, } dag = DAG( 'MySqlOperatorExample', default_args=default_args, description='MySqlOperatorExample', schedule_interval="30 18 * * *") insert_sql = "insert into log SELECT *

YYYY-MM column type in PostgreSQL

谁都会走 提交于 2020-11-29 08:20:36
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

心不动则不痛 提交于 2020-11-29 08:20:01
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

余生长醉 提交于 2020-11-29 08:19:56
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

萝らか妹 提交于 2020-11-29 08:19:08
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

牧云@^-^@ 提交于 2020-11-29 08:18:51
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

喜你入骨 提交于 2020-11-29 08:18:34
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

瘦欲@ 提交于 2020-11-29 08:18:24
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

YYYY-MM column type in PostgreSQL

和自甴很熟 提交于 2020-11-29 08:18:14
问题 I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)

Greenplum-cc-web安装

筅森魡賤 提交于 2020-11-29 06:01:52
第一章 文档概述 1、 本安装手册描述适用于Greenplum4.0以上版本的安装Greenplum-cc-web操作 第二章 安装介质 针对Greenplum版本下载对应Greenplum-cc-web包体greenplum-cc-web-x.x.x-LINUX-x86_64.zip; 下载地址: https://network.pivotal.io/products/pivotal-gpdb#/releases/1683/file_groups/26nNum=10 第三章 安装Performance Monitor数据收集Agent   gpadmin用户执行如下步骤【仅在master节点】。 3.1、使用gpperfmon_install命令, Greenplum安装完成后已经包含该命令。安装后会建立名为gpperfmon的数据库,默认使用gpmon用户。命令行中系统用户gpmon的密码。 [gpadmin@mdw ~]$ gpperfmon_install --enable --password gpmon --port 5432 3.2、重启GP数据库 [gpadmin@mdw ~]$ gpstop -r 3.3、确认监控采集进程是否已经启动。 [gpadmin@mdw ~]$ ps -ef | grep gpmmon gpadmin 2285 2276 0 22 :