Skip to content
Snippets Groups Projects
Select Git revision
  • c219cc37a7e429eab142462c68ad6ea45e41ff9f
  • SAR-150_add_transaction_id_in_all_logs default protected
  • master
  • sar-293_fix_lint_issue
  • sar-259/Testing-skallop-docs
  • sar-255/Publish-package-to-CAR
  • test-package
  • SAR-189-use-single-namespace-for-package-naming
  • revert-52d118c0
  • 0.4.1
  • 0.4.0
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.0
15 results

setup.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    sql_scripts.py 1.18 KiB
    create_database = """
    CREATE DATABASE adex_cache
        WITH
        OWNER = postgres
        ENCODING = 'UTF8'
        CONNECTION LIMIT = -1;
    """
    
    drop_table_skyviews = """
       DROP TABLE IF EXISTS public.skyviews;
    """
    
    create_table_skyviews = """
    CREATE TABLE public.skyviews
    (
        "id" SERIAL,
        "title" character varying(50),
        "observation" character varying(50),
        "beam" integer,
        "ra" double precision,
        "dec" double precision,
        "collection" character varying(50),
        "level" integer,
        "dataproduct_type" character varying(50),
        "dataproduct_subtype" character varying(50),
        "access_url" character varying(255),
        CONSTRAINT skyviews_pkey PRIMARY KEY (id)
    );
    """
    
    
    insert_into_skyviews = """
    INSERT INTO public.skyviews
    (
        title,
        observation,
        beam,
        ra,
        dec,
        collection,
        level,
        dataproduct_type,
        dataproduct_subtype,
        access_url) 
        VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)
    """
    
    # todo: join with api_dataentity table to retrieve the name (which also holds the beam)
    select_from_alta = """
    SELECT 
    "storageRef" as access_url, 
    "RA" as ra, dec, 
    "dataProductType" as dt, 
    "dataProductSubType" as dst, 
    "datasetID" as observation 
    FROM api_dataproduct
    """